Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 araujo joined #perl6
00:02 araujo joined #perl6
00:05 firstdayonthejob joined #perl6
00:12 ZoffixWin joined #perl6
00:13 ZoffixWin Any idea how to link to the Perl 6 RT queue without getting that stupid "possible cross-site forgery" error? Like this one: https://rt.perl.org/Public/Search/Results.html?Query=Queue%20=%20%27perl6%27%20AND%20%28Status%20=%20%27new%27%20OR%20Status%20=%20%27open%27%20OR%20Status%20=%20%27stalled%27%29
00:13 ZoffixWin (preferably sorted by most recent first)
00:14 ZoffixWin Guess not. Even if I copy the search URL and open it in a new tab in the same browser, I get the forgery error
00:18 Sgeo joined #perl6
00:27 arlenik joined #perl6
00:28 dalek doc: fbdcc94 | util++ | doc/Language/5to6-perlop.pod:
00:28 dalek doc: Fixed missing `C` in `C<->`
00:28 dalek doc: review: https://github.com/perl6/doc/commit/fbdcc94bfd
00:28 dalek doc: 7196c85 | util++ | / (9 files):
00:28 dalek doc: Fix typos
00:28 dalek doc: review: https://github.com/perl6/doc/commit/7196c85055
00:28 dalek doc: dcf8944 | util++ | doc/Language/nativecall.pod:
00:28 dalek doc: Fix typos
00:28 dalek doc: review: https://github.com/perl6/doc/commit/dcf8944361
00:29 ELBeavers joined #perl6
00:36 Juerd I find myself wanting 'unit react;' :)
00:38 ZoffixWin Well volunteered! :D
00:39 BenGoldberg joined #perl6
00:41 pierre-vigier joined #perl6
00:43 ZoffixWin New post: http://blogs.perl.org/users/zoffix_znet/2016/01/perl-6-is-written-in-perl-6.html
00:49 go|dfish joined #perl6
00:53 Util ZoffixWin++ # Excellent blog post; it will be a good reference to explain this aspect of Perl 6's coolness.
00:53 ZoffixWin \o/
00:58 Juerd ZoffixWin: Maybe change that last link to the actual RT queue
00:59 Juerd The home page of rt.perl.org is almost a dead-end. How to navigate to the list of bugs is very non-obvious.
00:59 ZoffixWin Juerd, can't. I get the "This looks like an attempt at cross-site forgery" error -_-
00:59 yeahnoob joined #perl6
00:59 Juerd Aargh
01:00 * Juerd really doesn't like that site.
01:00 ZoffixWin It's terrible indeed.
01:11 MadcapJake seems like you can't really position command line arguments with MAIN
01:11 Juerd What do you mean by 'position'?
01:13 MadcapJake i'm trying to do «p6dx complete -d <text>» and it won't let me do it that way
01:14 Juerd Subcommands?
01:14 MadcapJake 'multi sub MAIN ('complete', Bool :$m!, $filepath)' says "Cannot put required parameter $filepath after variadic parameters"
01:15 kanishka joined #perl6
01:15 Juerd $m is -d?
01:15 skids joined #perl6
01:15 MadcapJake yeah Juerd, i wrote that wrong, it should be `-m`
01:15 laz78 joined #perl6
01:16 MadcapJake but i want to allow more flags after `complete` and before `$filepath`
01:16 Juerd If you write :$filepath and trigger a "Usage:" thing, you'll see why
01:16 MadcapJake but i don't want to do `--filepath="<filepath>"`
01:16 Juerd I didn't say you should want that :)
01:17 MadcapJake it puts complete last>
01:17 MadcapJake o_O
01:17 Juerd By the way, why is 'm' required?
01:17 MadcapJake my plan was to have a separate multi for each flag
01:18 Juerd $ perl6 -e 'multi sub MAIN ("complete", $filepath, Bool :$m!) { say "m=$m, fp=$filepath" }' -m complete foo
01:18 Juerd m=True, fp=foo
01:18 Juerd I don't know why 'complete' can't go before -m though
01:19 MadcapJake yeah
01:19 MadcapJake i just realized i can do `("complete -m", $filepath)` :D
01:20 MadcapJake kind of cheating but it works
01:20 Juerd That'll separate 'complete -m'?
01:20 AlexDaniel ZoffixWin: great post, very motivational
01:20 ZoffixWin \o/
01:20 Juerd MadcapJake: You'd need to pass complete\ -m or "complete -m" in a shell.
01:20 MadcapJake i just want the order preserved, complete is like a subcommand with a series of flags that follow it and then a path or a string
01:21 Juerd Subcommands are a weak spot in MAIN signatures
01:21 MadcapJake gah
01:22 llfourn joined #perl6
01:23 Juerd Maybe Bool :$complete!
01:23 Juerd That would require --complete
01:24 MadcapJake i think all positional args have to go first so i would just need to make them all named or only have named at the end
01:25 Juerd Or fix the feature :P
01:25 Juerd Is there any usecase for literals in MAIN's signature, other than subcommands?
01:26 Juerd Oh, the error message has nothing to do with MAIN
01:26 Juerd I don't understand what's variadic about "complete" or :$m!, though
01:27 MadcapJake yeah it's just the rule for all signatures
01:27 Juerd Apparently, :$m! is considered variadic. But why?
01:27 MadcapJake Juerd: I definitely agree, they should just be treated as positional
01:27 MadcapJake i think because it's named
01:27 Juerd Maybe I don't understand the meaning of 'variadic'
01:27 MadcapJake the 'complete' one i don't understand
01:28 MadcapJake variadic (i think) just means it's either optional or named
01:28 MadcapJake anything with a default value, `?`, or `:`
01:28 Juerd I don't understand why named required is variadic.
01:29 MadcapJake agreed it's probably either an oversight or something's blocking it from being considered as such
01:29 cpage_ joined #perl6
01:30 Juerd Could you just put the $m at the end
01:30 MadcapJake because it is named so it can be slurped up by a slurpy named arg
01:30 Juerd ?
01:30 MadcapJake so even though it's required, it's really not positional so it has to be considered variadic
01:30 MadcapJake i don't really know, i'm just guessing xD
01:31 Juerd I understand that it's not positional, but I don't understand why that matters for positionals.
01:31 MadcapJake well i do know that most languages have the same requirement that positional then variadic for arguments, so i'm wondering if it's just a challenging PL problem
01:32 Juerd sub MAIN ("complete", $fp, Bool :$m?) { say "m=$m fp=$fp" }
01:32 Juerd $ perl6 complete.p6 -m complete a
01:32 Juerd m=True fp=a
01:32 Juerd 1;0 juerd@cxie:~$ perl6 complete.p6 complete -m a
01:32 Juerd Usage:
01:32 Juerd complete.p6 [-m] complete <fp>
01:32 Juerd :(
01:32 Juerd Put it at the end, and it requires it at the beginning :P
01:32 MadcapJake lol
01:34 MadcapJake i think what i'll go with is «script.pl6 --complete=<Str> [--meta=<IO::Path>]»
01:34 tony-o_ m: 'die'.die .die .die .die .die .die
01:34 camelia rakudo-moar 775271: OUTPUT«Method 'die' not found for invocant of class 'Str'␤  in block <unit> at /tmp/rxeeOk4pKE line 1␤␤»
01:34 tony-o_ i win
01:34 Juerd tony-o_: It did die.
01:35 ZoffixWin m: die .die .die .die .die .die .die
01:35 camelia rakudo-moar 775271: OUTPUT«Method 'die' not found for invocant of class 'Any'␤  in block <unit> at /tmp/nZq75iOEq7 line 1␤␤»
01:36 Juerd It dies perfectly.
01:38 tony-o_ m: 'die'.die;
01:38 camelia rakudo-moar 775271: OUTPUT«Method 'die' not found for invocant of class 'Str'␤  in block <unit> at /tmp/RB3UZxljoh line 1␤␤»
01:41 tony-o_ m: use MONKEY-TYPING; augment class Str { method die { die $.Str; } }; "die".die.die.die.die.die;
01:41 camelia rakudo-moar 775271: OUTPUT«die␤  in method die at /tmp/smzpRK4wC8 line 1␤  in block <unit> at /tmp/smzpRK4wC8 line 1␤␤»
01:45 addison joined #perl6
01:48 MadcapJake how do you see what exports a module has?
01:48 llfourn MadcapJake: does the module have unit module blah at the top?
01:48 MadcapJake yeah
01:48 Actualeyes joined #perl6
01:48 tony-o_ you can access that stuff through GLOBAL::<module>::
01:49 llfourn m: use Test; say Test::EXPORT::DEFAULT::.keys;
01:49 camelia rakudo-moar 775271: OUTPUT«(&isnt &plan &pass &cmp-ok &flunk &does-ok &subtest &unlike &like &use-ok &todo &skip-rest &eval-dies-ok &is-deeply &throws-like &ok &is &diag &done-testing &is-approx &skip &dies-ok &lives-ok &eval-lives-ok &MONKEY-SEE-NO-EVAL &nok &is_approx &isa-ok &can…»
01:49 tony-o_ guess you don't need GLOBAL:: anymore
01:51 llfourn I didn't know you ever did
01:51 tony-o_ i don't think that works on non-core modules
01:51 llfourn it should. As long as they have unit module blah
01:52 llfourn when you put 'is export' it adds it to EXPORT DEFAULT of each package it's in including UNIT::
01:52 llfourn so the only caveat is that if 'is export' is not inside a package you won't see it like that
01:52 tony-o_ does that not work on the module A { } syntax?
01:53 llfourn no it should work with that as well
01:53 llfourn I made https://github.com/LLFourn/p6-CompUnit-Util#capture-import for other situations
01:54 MadcapJake that keys method is showing my exported routine, but i'm getting "Could not find symbol &blah"
01:54 llfourn m: use Test; say Test::EXPORT::DEFAULT::<&ok>;
01:54 camelia rakudo-moar 775271: OUTPUT«sub ok (;; Mu | is raw) { #`(Sub|83321952) ... }␤»
01:54 llfourn that should work
01:55 tony-o_ llfourn++ ; having trouble with a local module but that might just be me having worked 14 hours on totally unrelated crap today
01:56 llfourn tony-o_: you were doing something similar?
01:56 MadcapJake i figured out my problem, i was calling it as if i had used `our` declaratore
01:56 MadcapJake declarator*
01:56 _Vi joined #perl6
01:56 MadcapJake llfourn++ thanks for the help!
01:56 llfourn no worries I learnt that trick from someone on here iirc
01:57 tony-o_ llfourn: it's a problem with what i was using to test
01:59 tony-o_ how is koalatee determined on modules.perl6.org?
01:59 MadcapJake a band of koala's bash some keys when looking at your code, how many keys they bash divided by total number of possible key presses, is the result
02:00 tony-o_ i'm for it
02:00 MadcapJake xD
02:01 MadcapJake i've no idea, iirc it was discussed on here, check the logs: http://irclog.perlgeek.de/perl6
02:02 sortiz m: module Foo { sub foo() is export {}; }; say UNIT::EXPORT::DEFAULT::.keys # Without unit, the export uses the current one
02:02 camelia rakudo-moar 775271: OUTPUT«(&foo)␤»
02:08 captain-adequate joined #perl6
02:09 sortiz m: unit module Foo; sub foo() is export {}; say Foo::EXPORT === UNIT::EXPORT # unit makes the declared package the current UNIT
02:09 camelia rakudo-moar 775271: OUTPUT«True␤»
02:12 llfourn sortiz: interesting I didn't know that..
02:12 llfourn m: module Foo {  sub foo() is export {} }; say Foo::EXPORT === UNIT::EXPORT
02:12 camelia rakudo-moar 775271: OUTPUT«True␤»
02:13 llfourn hmm maybe we are using === wrongly
02:13 llfourn m: module Foo {  sub foo() is export {} }; say Foo::EXPORT =:= UNIT::EXPORT
02:13 camelia rakudo-moar 775271: OUTPUT«False␤»
02:14 llfourn m: unit module Foo; sub foo() is export {}; say Foo::EXPORT =:= UNIT::EXPORT
02:14 camelia rakudo-moar 775271: OUTPUT«False␤»
02:14 sortiz llfourn, I was that someone.
02:14 llfourn m: unit module Foo; sub foo() is export {}; say UNIT::EXPORT =:= UNIT::EXPORT
02:14 camelia rakudo-moar 775271: OUTPUT«True␤»
02:14 Juerd MadcapJake: I'm nearing completion on a patch for your command line parsing thing. Would you care to test it?
02:14 [Coke] ZoffixWin++
02:15 llfourn though to me === should do the trick but I dunno. I don't think unit module Foo atm; actually makes Foo the same as UNIT (though there is an RT saying it should).
02:15 Juerd MadcapJake: It consists of two changes: 1. allow -named after positionals and only stop switch parsing at '--' (instead of at '--' or any positional), 2. assume in "Usage: " that string literals come before named switches.
02:15 ZoffixWin tony-o_, https://github.com/perl6/modules.perl6.org/blob/master/lib/ModulesPerl6/Metrics/Koalatee.pm#L21
02:16 Juerd MadcapJake: I think that these changes combined make it better suited for subcommands.
02:16 llfourn sortiz: https://rt.perl.org/Public/Bug/Display.html?id=127305
02:17 ELBeavers joined #perl6
02:17 llfourn sortiz: the one who taught me about the Test::EXPORT trick? Yes! Now I remember :)
02:20 sortiz m: module Foo { BEGIN { say ::?PACKAGE} }; say ::?PACKAGE # module declares a new package, but alone don't change UNIT
02:20 camelia rakudo-moar 775271: OUTPUT«(Foo)␤(GLOBAL)␤»
02:21 llfourn sortiz: what do you mean with regards to UNIT?
02:22 sortiz UNIT is a virtual scope, related to the compunit, i.e, file compiled.
02:23 llfourn ah yes I thought you were saying somethig regarding unit module. I think the situation there is that unit module probably should make the module and UNIT the same but atm it doesn't.
02:23 sortiz And all "is export", operates at that level. In a file can be any numbers of packages (package, module, class, etc.) but only one UNIT.
02:24 n0tjack joined #perl6
02:24 Averna joined #perl6
02:24 llfourn yes. But is export also works on the package level but I think you know that because you were the one who showed me :P
02:24 sortiz Not the "same", a real package is a Stash, but UNIT is a pseudo one.
02:25 llfourn yep. We need to document and explain this eventually... probably soon.
02:28 sortiz So you can only have a "unit" declaration per file, that "aliases" the named package with the current UNIT.
02:30 MadcapJake Juerd: sweet! I'd love too!
02:31 MadcapJake Gotta get my son ready for bed, i'll be back in about an hour
02:32 Juerd MadcapJake: By that time I'll have a patch ready for you, and I'll be asleep :)
02:32 MadcapJake okie dokie! xD
02:33 khw joined #perl6
02:34 Juerd MadcapJake: You'll still have to put the :$m! at the end, though :)
02:37 sortiz llfourn, Would make the attempt to document it, but my English isn't good
02:37 llfourn sortiz: ok well, maybe you review what I write :)
02:38 llfourn (but it seems good to me!)
02:40 sortiz m: unit module Foo; say Foo::.WHAT, UNIT::.WHAT
02:40 camelia rakudo-moar 775271: OUTPUT«(Stash)(PseudoStash)␤»
02:41 llfourn m: unit module Foo; BEGIN note UNIT::.WHAT: # it doesn't work at begin from what I remember
02:41 camelia rakudo-moar 775271: OUTPUT«(PseudoStash)␤»
02:41 llfourn or not
02:41 llfourn m: unit module Foo; BEGIN note UNIT::.keys: # it doesn't work at begin from what I remember
02:41 camelia rakudo-moar 775271: OUTPUT«(SIGSEGV WhateverCode Slip &callframe Pair SIGHUP &flat PromiseStatus CurrentThreadScheduler &infix:<∖> &RETURN-LIST utf8 StringyEnumeration &splice Distribution PF_INET6 Backtrace &GATHER &callsame &postcircumfix:<{ }> &print &infix:<lt> &sinh &GENERATE…»
02:41 llfourn cool.
02:43 sortiz m: say UNIT.WHO # Some more info
02:46 camelia rakudo-moar 775271: OUTPUT«PseudoStash.new(("!UNIT_MARKER" => !UNIT_MARKER,"\$!" => Nil,"\$/" => Nil,"\$=finish" => Mu,"\$=pod" => [],"\$?PACKAGE" => GLOBAL,"\$_" => Any,"\$¢" => Nil,"::?PACKAGE" => GLOBAL,:EXPORT(EXPORT),:GLOBALish(GLOBAL)))␤»
02:46 Juerd MadcapJake: https://github.com/Juerd/rakudo/commits/nom
02:46 llfourn :: is the same at .WHO afaik
02:46 Juerd MadcapJake: Have fun! :)
02:46 gtodd joined #perl6
02:46 n0tjack joined #perl6
02:49 gtodd is there anyway to represent a time period as an object? instead of   Date.new([some value that means now]) .. Date.new([some value that means date of now + 1 year])
02:50 ZoffixWin Wasn't there a Duration type?
02:51 ZoffixWin hu{TAB}... where's huggable :/
02:51 geekosaur I thought so
02:51 ZoffixWin yeah
02:52 Juerd m: my $a = now; sleep 2; my $b = now; say ($b - $a).WHAT;
02:52 camelia rakudo-moar 775271: OUTPUT«(Duration)␤»
02:52 Juerd Yes, there are durations! :)
02:52 geekosaur Temporal mentions Instant but not Duration. I don't see where either is defined
02:53 ZoffixWin It is in the type docs, but I don't see any usage docs http://docs.perl6.org/type/Duration
02:53 huggable joined #perl6
02:55 geekosaur m: Duration.^methods.say
02:55 camelia rakudo-moar 775271: OUTPUT«(new Bridge Rat Num narrow sign sqrt sin tan cotan acosech abs conj atan2 cosec base pred asec acotan cosh acos acosec sech ceiling unpolar log10 atanh log exp acosh truncate sinh tanh acotanh round Int Real sec floor isNaN succ rand asin cos cis polymod c…»
02:55 geekosaur sigh
02:55 gtodd my $yearsworthofmoments = now + Duration.year()
02:55 gtodd :)
02:58 geekosaur m: Duration.^methods(:local).say
02:58 camelia rakudo-moar 775271: OUTPUT«(new Bridge Rat Num narrow sign sqrt sin tan cotan acosech abs conj atan2 cosec base pred asec acotan cosh acos acosec sech ceiling unpolar log10 atanh log exp acosh truncate sinh tanh acotanh round Int Real sec floor isNaN succ rand asin cos cis polymod c…»
02:59 sortiz llfourn, is the same iff the invocant is a scope ;)
02:59 _Vi joined #perl6
03:00 FreezerburnV joined #perl6
03:00 FreezerburnV o/
03:00 llfourn sortiz: i know all too well :) https://github.com/LLFourn/p6-CompUnit-Util#descend-who
03:03 colomon joined #perl6
03:04 sortiz llfourn++ # Nice util
03:05 FreezerburnV Is there a recommended license for Perl6 projects? (I'm personally a fan of MIT, but considering I'm wrapping a module without a license, figured it would be a good idea to ask)
03:05 llfourn Artistic v2 I think
03:05 ZoffixWin FreezerburnV, I use same as Perl: Artistic 2
03:05 FreezerburnV Not heard of that one, actually
03:06 Juerd joined #perl6
03:06 ZoffixWin FreezerburnV, https://github.com/zoffixznet/perl6-Color/blob/master/LICENSE
03:06 Juerd Meh, connection issues :(
03:06 Juerd I typed a long line to TimToady; did that get through before I disconnected?
03:06 ZoffixWin FreezerburnV, is the licenseless module you're wrapping in the ecosystem? Probably should open an Issue on it, suggesting to add a license.
03:07 ZoffixWin Juerd, nope
03:07 yeahnoob joined #perl6
03:07 FreezerburnV ZoffixWin: Yep, SDL2::Raw. I'll go ahead and do that
03:07 Juerd Hurrah for input history then!
03:07 Juerd TimToady: S06 says "As usual, switches are assumed to be first, and everything after the first non-switch,", but in systems that support --long-names and --, that's not at all "usual". In fact, Perl 6 deviating from the convention of allowing switches after positionals might be problematic because it violates the 'least surprise' thing. Is it too late to change this? Changing it would also help a lot with subcommands.
03:07 Juerd ZoffixWin: Thanks
03:09 Juerd MadcapJake: https://github.com/Juerd/rakudo/commits/nom in case it got lost in my server's network disconnection
03:10 Juerd I'm off to bed
03:11 Juerd Good night, all(@nicks)
03:11 ZoffixWin night
03:11 sortiz night
03:11 FreezerburnV Night!
03:11 AlexDaniel ZoffixWin: so what happened with huggable?
03:11 AlexDaniel ZoffixWin: did he crash or something?
03:11 Juerd Good any(@times-of-day Z @nicks)
03:12 ZoffixWin AlexDaniel, no idea. She just dies after a couple of days. I come back and do screen -r and just get "there's no screen to return to". Haven't had the time to investigate that yet.
03:13 AlexDaniel ZoffixWin: dammit…
03:13 AlexDaniel ZoffixWin: actually, I have exactly the same issue with Net::IRC::Bot
03:13 ZoffixWin Weird.
03:14 Zero_Dogg joined #perl6
03:14 AlexDaniel ZoffixWin: I was blaming Net::IRC::Bot but now I don't know what to say
03:14 ZoffixWin Do you use DBIish too ?
03:14 AlexDaniel not in that bot
03:14 ZoffixWin hm
03:15 geekosaur at a guess, bothbots don't handle netsplits or server disconnects well?
03:15 AlexDaniel I've also noticed that it tends to leave together with other people… And sometimes it can happen even after a few minutes, but other times it stays up for days
03:16 AlexDaniel geekosaur: yeah, something like that
03:16 AlexDaniel maybe
03:16 geekosaur *los* of bots seem to die or get stuck when the server goes away
03:17 ZoffixWin Yeah, that's probably it. There's no reconnect mechanism in huggable yet.
03:17 AlexDaniel also, sometimes it crashes but other times it just starts eating the memory…
03:17 AlexDaniel ZoffixWin: if you figure it out, please leave me a note that it is fixed
03:17 ZoffixWin sure
03:18 AlexDaniel thanks
03:21 n0tjack joined #perl6
03:22 ZoffixWin Man, seems C people aren't fans of stuff we Perl folks put into Acme::
03:22 ZoffixWin Want to play with NativeCall, but having trouble finding some funny C lib to play with
03:37 vendethiel joined #perl6
03:38 laz78 joined #perl6
03:45 noganex joined #perl6
03:50 MadcapJake Juerd: multi sub MAIN ('complete', Str $begin, Bool :$m!, Int :$depth) #-> complete -m [--depth=<Int>] <begin>
03:50 MadcapJake Juerd: perfect!
03:51 MadcapJake that's exactly the form i want, string at the end, subcommand at the beginning, flags in the middle
03:53 MadcapJake multi sub MAIN ('complete', Str $begin, Bool :$m) #-> complete [-m] <begin>
03:57 ZoffixWin Found a lib to learn NativeCall with (by making a bindings module): liballegro "portable library for cross-platform game and multimedia development"
03:58 ZoffixWin I think this is something I played with a decade ago, when learning C :) Gonna finish what I started lol
04:01 ZoffixWin or maybe not.. it has a lot of stuff that's not very interesting
04:10 FreezerburnV So I'm pretty darn sure I'm not doing any output during compile time to stdout or stderr, though I am doing "./SDL2.dll".IO.e either at compile or run time, depending on the state of the code. And I'm still getting the precomp-id error
04:11 FreezerburnV And after that error, it will give me an error about something not existing in the .precomps directory
04:11 FreezerburnV (if I try and run the file again)
04:11 FreezerburnV I'm on whatever the latest thing rakudobrew installed is (I updated tonight)
04:12 Psyche^ joined #perl6
04:26 n0tjack joined #perl6
04:33 ZoffixWin Can you pastebin the actual error and maybe the code too?
04:35 FreezerburnV Error: http://pastebin.com/B8L3VfA5
04:36 FreezerburnV sdl2.pm6: https://github.com/Freezerburn/SDL2-p6/blob/master/sdl2.pm6
04:36 FreezerburnV I have all the code on Github, so you can see all of it
04:36 FreezerburnV Except the OpenGL module. Need to make that repo...
04:40 FreezerburnV ZoffixWin: Ok now it's all on github :)
04:43 ZoffixWin FreezerburnV, have you tried commenting out this line? https://github.com/Freezerburn/SDL2-p6/blob/master/sdl2.pm6#L6
04:43 ZoffixWin Damn. You wrote all that stuff since I pointed out the snake demo?
04:44 FreezerburnV Still doesn't seem to like it :(
04:44 FreezerburnV And no
04:44 FreezerburnV I wrote all of thise in December
04:44 FreezerburnV Most of it, at least
04:44 ZoffixWin Ah  *phew*... I was about to feel unproductive :)
04:44 FreezerburnV Haha
04:44 FreezerburnV I've been mostly busy today. Work + Bible study = not much time for Perl today
04:44 FreezerburnV I'm just trying to get it to compile again
04:45 FreezerburnV It was working earlier! I swear
04:45 FreezerburnV There was a blue screen being redrawn and everything
04:46 ZoffixWin Bible study? God hates everyone. The end. What's there to study? :)
04:46 Herby_ joined #perl6
04:46 Herby_ Good evening, everyone!
04:46 yoleaux 21 Jan 2016 06:16Z <MadcapJake> Herby_: I think it's just sudo apt-get install libgumbo1
04:46 ZoffixWin Well, no idea why it breaks with that error. I'd start commenting out all of those debug() statements and anything else that can produce output, if that were my code.
04:46 FreezerburnV That's a rather simplistic view that seems to ignore the entirety of the New Testament :)
04:46 FreezerburnV But I feel like if you wanted to argue religion, it would be best done over PM or something instead of spamming the perl6 IRC channel
04:47 ZoffixWin Or all of the 1000s of other holy books :P
04:48 Herby_ Still having issues with the Gumbo module
04:48 ZoffixWin :(
04:48 Herby_ I installed the Gumbo Parser library
04:48 FreezerburnV ZoffixWin: Well feel free to talk to me about that outside of #perl6, I'm always open for a discussion. I'll keep my talk in this channel to getting my scripts to compile for the sake of everyone else :)
04:49 Herby_ getting the error "Cannot locate native library 'libgumbo.so.1'"
04:49 Herby_ not sure where to go from here
04:50 ZoffixWin Herby_, what OS?
04:50 Herby_ ubuntu 14.04
04:50 AlexDaniel libgumbo-dev ?
04:50 Herby_ trying to use the Perl 6 module Gumbo
04:50 AlexDaniel ah no
04:50 AlexDaniel you should not really need the dev package…
04:51 ZoffixWin Hm. I don't have "gumbo" anything on my Bodhi
04:51 AlexDaniel libgumbo1 package should actually do it…
04:51 ZoffixWin FreezerburnV, is that an invitation to PM right now? :)
04:51 Herby_ https://github.com/Skarsnik/perl6-gumbo
04:51 FreezerburnV ZoffixWin: Feel free! I just don't want to turn a programming channel into a large argument about religion for everyone's ake
04:52 Herby_ "sudo apt-get install libgumbo1" is returning "unable to locate package libgumbo1"
04:52 FreezerburnV Because it's usually not just like 3-4 sentences on each side :P
04:52 AlexDaniel ah no, libgumbo1 package is only in debian testing and unstable.
04:52 AlexDaniel Herby_: yeah right. :(
04:52 ZoffixWin There's no gumbo anything on my Bodhi, which is a fork of Ubuntu 14.04
04:52 ZoffixWin Herby_, have you installed ANY libs?
04:53 Herby_ only thing I've installed so far on my fresh linux install is rakudobrew and Gumbo Parser
04:53 ZoffixWin I mean... for that gumbo thing
04:53 Herby_ https://github.com/google/gumbo-parser
04:54 Herby_ just trying to play around with a little html parsing as a perl6 exercise
04:54 Herby_ Gumbo looked to be my best (if only) option
04:54 Herby_ but I'm open to other ideas
04:54 AlexDaniel ZoffixWin: what's your problem? It's a good book! :) https://www.youtube.com/watch?v=oC-fsFT7ZKs
04:56 MadcapJake Herby what ubuntu are you on?
04:56 Herby_ ubuntu 14.04
04:56 MadcapJake ahh libgumbo is only on 15.10 i think
04:56 Herby_ well thats a stinker
04:56 MadcapJake have you tried installing manually
04:56 Herby_ no clue how to do that
04:56 Herby_ but i'm game if there are instructions somewhere
04:57 MadcapJake git clone https://github.com/google/gumbo-parser.git
04:57 MadcapJake cd gumbo-parser
04:57 MadcapJake rest of instructions right on git repo: https://github.com/google/gumbo-parser#installation
04:57 Herby_ yep, I've installed that
04:57 Herby_ appeared to install succesfully
04:58 MadcapJake you did sudo make install
04:58 Herby_ yeppers
04:58 Herby_ followed the instructions to the letter
04:59 Herby_ well, through sudo make install
04:59 MadcapJake ok try `sudo updatedb && locate libgumbo.so.1`
05:00 ZoffixWin Herby_, when you figure it out, I would suggest you make a PR to the P6 Gumbo module so that instructions could be included in the docs :)
05:01 Herby_ MadcapJake, it found it in /home/herby/gumbo-parser/.libs/libgumbo.so.1
05:01 Herby_ and /usr/local/lib/libgumbo.so.1
05:01 quester joined #perl6
05:01 Herby_ Zoffix, I'll definitely try!
05:01 MadcapJake ok use the /usr/local one
05:02 MadcapJake take that path and put it in a routine at top of your perl6 file `sub lib { '/usr/local/lib/libgumbo.so.1' }`
05:02 quester Good *, perl6!
05:02 MadcapJake wait, i'm not really sure how you're to use this, let me look at the perl6 module
05:03 Herby_ ok thanks.  I'm trying to run the second example in the module docs.  The one talking about "fancy"
05:03 jack_rabbit joined #perl6
05:04 MadcapJake ok Herby_ i'll give it a go, i'm building from source too, just to make sure it works the same
05:05 Herby_ sweet, thanks.  Let me know if your "panda install Gumbo" works with successful testing
05:05 Herby_ if you're doing that step
05:06 MadcapJake yep, it's installing right now
05:06 cpage_ joined #perl6
05:07 MadcapJake can't locate library here too
05:07 Herby_ k
05:12 Herby_ any luck?
05:13 MadcapJake no :( i've got the same situation as you, it doesn't make sense that native wouldn't look in /usr/local/lib
05:16 Herby_ Well thanks for taking time to investigate it
05:16 Herby_ any other modules you'd recommend for simple html parsing?
05:16 Herby_ in perl 6
05:17 geekosaur ideally it'd check /etc/ld.so.conf on linux / *bsd, and appropriate other files on other OSes (use crle to dump /var/ld/ld.conf on Solaris, for example)
05:17 geekosaur %PATH% on Windows, etc.
05:20 geekosaur (actually to do this right on Solaris you'd want to be even more clever, but that would work for a start. ideally you'd look for a config for the program being run first and fall back to ld.conf)
05:21 MadcapJake you know what
05:22 MadcapJake i think this is the same thing that Linenoise went through.
05:23 lustlife` joined #perl6
05:24 Herby_ he ever find a solution?
05:26 MadcapJake If you want to get a bit technical Herby_, git clone the Gumbo P6 module, change `constant LIB = ('gumbo', v1)` to `constant LIB = sub { '/usr/local/lib/libgumbo.so.1' },  then just `panda install <path-to-custom-gumbo-module>`.
05:27 MadcapJake Herby_: he did but it involves building the linenoise.so via a Build.pm and the c/h linenoise files
05:27 Herby_ hm
05:27 Herby_ hmmmmmm
05:27 Herby_ let me try your tech tip
05:27 Gentoolman joined #perl6
05:28 MadcapJake i'll try to, in case i have the syntax off, i can help ya
05:28 MadcapJake s/to/too/
05:28 Gentoolman How to connect it to apache web server
05:28 geekosaur nativecall is not real swift right now. I wanted to poke at it but it was like a week before Christmas so I let it go. still need to go back and see if I can put together a coherent proposal for its proper behavior
05:29 geekosaur although it does seem like some of what I said at the time got into it since we have api versions now
05:30 MadcapJake yeah that's neat! i didn't even know you could do that til today, i think the only thing I'd like to see is supplying custom paths to libs via the use statement or via a perl6/panda commandline flag
05:31 MadcapJake i've started a few wrappers but right now i just have LIB just return an absolute path to my library
05:32 MadcapJake s/just// xD
05:33 Herby_ u oh
05:33 MadcapJake tests pass for me Herby_
05:34 Herby_ ha hah!
05:34 Herby_ you're the man :)
05:34 Herby_ success!
05:35 Herby_ and now the module example script works no problem
05:36 Herby_ Thanks, MadcapJake
05:36 Herby_ Now I just have to figure out how to use the module, beyond the example
05:36 yeahnoob joined #perl6
05:37 Herby_ I'm not too familiar with Git.  Should we submit a PR or something with our findings?
05:37 MadcapJake I'm posting an issue, there needs to be a more universal solution
05:38 Herby_ great, thanks
05:38 MadcapJake no prob! Glad I could help!
05:40 xpen joined #perl6
05:45 trustfundbby96 joined #perl6
05:47 Cabanossi joined #perl6
05:54 ELBeavers joined #perl6
06:02 Amnez777- joined #perl6
06:03 rickbike joined #perl6
06:09 pierre-vigier joined #perl6
06:12 n0tjack joined #perl6
06:20 xpen joined #perl6
06:25 pierre-vigier joined #perl6
06:43 rickbike Hello perl6ers
06:47 domidumont joined #perl6
06:47 rickbike Trying to use a number as a hash key
06:47 rickbike sub MAIN (*%h) { %h.keys.say; };
06:47 rickbike then test.pl --foo=bar --42=bat
06:48 rickbike returns (foo -42)
06:48 rickbike why -42?
06:53 mr-foobar joined #perl6
06:53 domidumont joined #perl6
07:00 gfldex rickbike: please file a bug report. It's either a bug in the options parser or a bug in the docs.
07:01 rickbike OK
07:02 quester left #perl6
07:02 rickbike any suggestion on a catchy subject/title of bug report?
07:03 gfldex "fail to handle numbers as option name for MAIN"
07:04 CIAvash joined #perl6
07:04 rickbike thanks gfldex
07:09 ugexe you cant have variable names that start with numbers
07:09 ugexe :42(bat) would fail just the same
07:09 gfldex he didn't ask for that
07:10 ugexe how would you access named variable 42 then?
07:10 gfldex either %h<--42> or %h<42>
07:16 mr-foobar joined #perl6
07:18 dalek ecosystem: f54022b | azawawi++ | META.list:
07:18 dalek ecosystem: ImageMagick's MagickWand API bindings are here :)
07:18 dalek ecosystem:
07:18 dalek ecosystem: See https://github.com/azawawi/perl6-magickwand
07:18 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/f54022b7f5
07:22 RabidGravy joined #perl6
07:22 Zero_Dogg joined #perl6
07:24 _mg_ joined #perl6
07:26 vendethiel joined #perl6
07:28 nakiro joined #perl6
07:30 sortiz Someone remember where is ::?CLASS documented?
07:31 llfourn sortiz: in design documents?
07:32 mr-foobar joined #perl6
07:32 llfourn sortiz: https://design.perl6.org/S14.html
07:32 domidumont1 joined #perl6
07:33 sortiz llfourn, thanks!
07:38 sjoshi joined #perl6
07:40 mr-foobar joined #perl6
07:43 firstdayonthejob joined #perl6
07:45 FROGGS joined #perl6
07:46 [Tux] csv-ip5xs       17.704
07:46 [Tux] test            22.555
07:46 [Tux] test-t          12.409
07:46 [Tux] csv-parser      49.714
07:47 RabidGravy is it actually intentional that a regex/token/rule defined in a package can only be used if that package is a grammar?
07:48 RabidGravy i.e.
07:49 RabidGravy m: class Foo { our token valid-db-name { ^<[a .. z]><[a .. z0 .. 9_$()+/-]>*$ } }; say so "ab1-foo" ~~ /<Foo::valid-db-name>/;
07:49 camelia rakudo-moar 775271: OUTPUT«Method '!cursor_init' not found for invocant of class 'Foo'␤  in block <unit> at /tmp/Qf5wMBUigj line 1␤␤»
07:53 FROGGS RabidGravy: the problem is the invocant
07:53 FROGGS m: class Foo { our token valid-db-name (Mu:) { ^<[a .. z]><[a .. z0 .. 9_$()+/-]>*$ } }; say so "ab1-foo" ~~ /<Foo::valid-db-name>/;
07:53 camelia rakudo-moar 775271: OUTPUT«Method '!cursor_init' not found for invocant of class 'Foo'␤  in block <unit> at /tmp/IPsUYRxh1Q line 1␤␤»
07:53 FROGGS errr
07:54 FROGGS m: class Foo { our token valid-db-name (Mu:) { ^<[a .. z]><[a .. z0 .. 9_$()+/-]>*$ } }; say so "ab1-foo" ~~ /<&Foo::valid-db-name>/;
07:54 camelia rakudo-moar 775271: OUTPUT«True␤»
07:54 dalek doc: 21754ba | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod:
07:54 dalek doc: name ::?CLASS
07:54 dalek doc: review: https://github.com/perl6/doc/commit/21754ba1db
07:54 FROGGS m: class Foo { our token valid-db-name { ^<[a .. z]><[a .. z0 .. 9_$()+/-]>*$ } }; say so "ab1-foo" ~~ /<&Foo::valid-db-name>/;
07:54 camelia rakudo-moar 775271: OUTPUT«True␤»
07:54 FROGGS so, it is not just about the invocant :o)
07:55 RabidGravy that clears something up though
07:56 RabidGravy just seemed overkill to define a grammar for basically a single token
07:57 RabidGravy you may have realised that I try to avoid using regular expressions if at all possible :)
08:04 trustfundbby96 joined #perl6
08:04 FROGGS hmmmm, I like regexes...
08:06 masak morning, #perl6
08:06 moritz \o masak, *
08:07 FROGGS morning m&m
08:07 * moritz feels like an endangered food right now
08:08 * FROGGS is too tired to be hungry
08:09 * masak is too tired to be tired
08:10 * FROGGS is soo tired he cannot even say "tired"
08:10 masak .u tired
08:10 yoleaux U+1F62B TIRED FACE [So] (😫)
08:10 masak 😫
08:12 darutoko joined #perl6
08:16 pierre-vigier joined #perl6
08:16 llfourn that looks more like SOMEONE BROKE LEGOS face than tired
08:28 TEttinger .u cat
08:28 yoleaux U+0ECB LAO TONE MAI CATAWA [Mn] (◌໋)
08:28 yoleaux U+A2B6 YI SYLLABLE CAT [Lo] (ꊶ)
08:28 yoleaux U+101EC PHAISTOS DISC SIGN CAT [So] (𐇬)
08:28 TEttinger no cat face laughing?
08:29 cc9989 joined #perl6
08:30 leont joined #perl6
08:31 abaugher joined #perl6
08:32 zakharyas joined #perl6
08:34 cognominal .u butterfly
08:34 yoleaux No characters found
08:34 cognominal .u bug
08:34 yoleaux U+1A00 BUGINESE LETTER KA [Lo] (ᨀ)
08:34 yoleaux U+1A01 BUGINESE LETTER GA [Lo] (ᨁ)
08:34 yoleaux U+1A02 BUGINESE LETTER NGA [Lo] (ᨂ)
08:35 cognominal .u ant
08:35 yoleaux U+1CE9 VEDIC SIGN ANUSVARA ANTARGOMUKHA [Lo] (ᳩ)
08:35 yoleaux U+20D4 COMBINING ANTICLOCKWISE ARROW ABOVE [Mn] (◌⃔)
08:35 yoleaux U+20DA COMBINING ANTICLOCKWISE RING OVERLAY [Mn] (◌⃚)
08:37 ely-se joined #perl6
08:37 darutoko joined #perl6
08:39 araujo_ joined #perl6
08:40 ely-se Hello, world!
08:40 jdv79 good morning
08:41 abraxxa joined #perl6
08:41 araujo_ joined #perl6
08:43 araujo_ joined #perl6
08:45 mr-foobar joined #perl6
08:48 rindolf joined #perl6
08:55 RabidGravy gosh, I started writing this module in April, better get finishing it then
08:56 sno joined #perl6
08:58 mr-foobar joined #perl6
09:02 sortiz m: use Test; plan 2; sub falla() { fail "nope" }; my $f = falla(); ok not $f.defined, "Handling"; ok $f.handled # Known bug?
09:02 camelia rakudo-moar 775271: OUTPUT«1..2␤ok 1 - Handling␤nope␤  in sub falla at /tmp/DQ2VSG5Sls line 1␤  in block <unit> at /tmp/DQ2VSG5Sls line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3041␤  in block <unit> at /tmp/DQ2VSG5Sls line 1␤␤# Looks lik…»
09:04 RabidGravy sorry not quite sure what the point is
09:04 RabidGravy it will throw the failure when you assign it to the variable
09:05 sortiz Its documented that testing for .defined in a failure, make its "handled".
09:06 RabidGravy sure
09:06 sortiz So $f.hanldled should returns True, not throw it
09:08 RabidGravy m: sub f() { fail "boom" }; say "before"; my $f = f(); say "after";
09:08 camelia rakudo-moar 775271: OUTPUT«before␤after␤»
09:08 RabidGravy okay
09:09 ely-se need a tool that warns on unused variables
09:09 ely-se this is too error-prone
09:09 rindolf joined #perl6
09:09 sortiz A failure must throw when sinked or used as an invocant if not handled.
09:10 sortiz m: sub f() { fail "boom" }; say "before"; f(); say "after";
09:10 camelia rakudo-moar 775271: OUTPUT«before␤boom␤  in sub f at /tmp/Yo9UGSpWvj line 1␤  in block <unit> at /tmp/Yo9UGSpWvj line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/Yo9UGSpWvj line 1␤␤»
09:10 leont joined #perl6
09:20 maxb_ joined #perl6
09:21 Guest30572 quick question regarding slurpy behaviour - I have this sub definition:
09:22 Guest30572 sub slurpyPerl5 (*@_)  { @_.join('/').say }
09:22 virtualsue joined #perl6
09:22 Guest30572 ...which I call like that:
09:22 Guest30572 slurpyPerl5([1 , [1.1,1.2],2,3] , 10 , 20)
09:22 Guest30572 and I get this: 1/1.1 1.2/2/3/10/20
09:23 Guest30572 I always figured the flattening happens hierarchical so i should be: 1/1.1/1.2/2/3/10/20
09:24 sortiz Just checking the code, not .handled method declared so docu bug or NYI.
09:24 Guest30572 did I get anything wrong,- the documantation says: one asterisk will flatten arguments by dissolving one or more layers of bare Iterables
09:25 RabidGravy sortiz, which documentation as a matter of interest?
09:25 masak Guest30572: yes, I think you have a wrong assumption somewhere. it doesn't flatten all the way like that
09:25 sortiz http://doc.perl6.org/type/Failure#method_handled
09:26 leont Guest30572: try (**@)
09:26 leont (**@_)
09:26 masak um
09:26 masak I'm not sure that's implemented
09:26 leont Ow
09:26 masak and I suspect even that one respects the Array boundary in one of the arguments
09:27 Guest30572 already tried **@_ - it does even less flattening: 1 1.1 1.2 2 3/10/20
09:27 masak m: say [1, 2, (3, 4), 5].flat
09:27 camelia rakudo-moar 775271: OUTPUT«(1 2 (3 4) 5)␤»
09:27 masak say [1, 2, [3, 4], 5].flat
09:27 masak m: say [1, 2, [3, 4], 5].flat
09:27 camelia rakudo-moar 775271: OUTPUT«(1 2 [3 4] 5)␤»
09:28 masak m: say (1, 2, (3, 4), 5).flat
09:28 camelia rakudo-moar 775271: OUTPUT«(1 2 3 4 5)␤»
09:28 masak m: say (1, 2, [3, 4], 5).flat
09:28 camelia rakudo-moar 775271: OUTPUT«(1 2 3 4 5)␤»
09:28 masak m: say (1, 2, [3, 4, [5, 6]], 7).flat
09:28 camelia rakudo-moar 775271: OUTPUT«(1 2 3 4 [5 6] 7)␤»
09:28 jdv79 is there a new chan or are a lot of people just taking a break lately?
09:28 masak jdv79: do we talk too little? :P
09:28 moritz jdv79: there's #perl6-toolchain and #perl6-release
09:29 masak what's #perl6-release for?
09:29 pierre-vigier joined #perl6
09:29 jdv79 moritz: thanks
09:30 Guest30572 say [1, 2, [3, 4], 5].flat gives me (1 2 [3 4] 5) - not hierarchical either :-(
09:30 jdv79 i just skimmed my backlog and i didn't see larry or liz or jonathan.  i'm guessing a break then.
09:30 araujo joined #perl6
09:30 araujo joined #perl6
09:30 ELBeavers joined #perl6
09:30 ely-se say [1, 2, |[3, 4], 5].flat
09:31 ely-se m: say [1, 2, |[3, 4], 5].flat
09:31 camelia rakudo-moar 775271: OUTPUT«(1 2 3 4 5)␤»
09:32 Guest30572 quit
09:33 sortiz Array.flat don't flat common Arrays, see: https://github.com/rakudo/rakudo/blob/nom/src/core/Array.pm#L366
09:33 RabidGravy I'm not quite sure why you'd want to flatten to an arbitrary depth
09:34 pierre-vigier joined #perl6
09:34 lnrdo joined #perl6
09:38 n0tjack joined #perl6
09:41 mr-foobar joined #perl6
09:44 brrt joined #perl6
09:44 sortiz RabidGravy, for arbitrary depth, I want an adverb :deep in flat :)
09:46 masak a named parameter
09:47 sortiz Yes
09:47 sortiz With default 1
09:48 masak I'm pretty sure deep flattening by default must have been discussed during the GLR, and rejected
09:50 ely-se deep flattening by default is a horrible idea
09:50 ely-se there should be defaults only if one behaviour is *far* more common than all the others, and the default should then be that behaviour, and in the case of flattening it's shallow flattening
09:51 sortiz Sure, but I been investigating about Array.flat for some time, see RT#127121. My current view is that the current implementation is a leftover from GLR, needed to keep roast passing, there are 9 tests that depend on it.
09:51 masak interesting.
09:51 masak my current stance is that I tend to stay away from most kinds of flattening in my code.
09:51 masak at most, I lean on the one-argument rule
09:52 masak the 007 has two explicit `flat` calls, both of them in .t files
09:52 masak s/007/007 codebase/
09:54 sortiz The real problem is that the people expect that "flat" flatten.
09:56 mr-foobar joined #perl6
09:57 sortiz During GLR a .List method must be added to Array to compensate the fact that .list broke, I tough that Array.flat should be Array.Seq and the code needed changed.
09:57 domidumont joined #perl6
09:58 jast personally I don't expect deep flattening
09:58 brrt i thought we had the slip thingy for that
09:58 sortiz On the other side Iterator.flat just DWIM
09:59 mr-fooba_ joined #perl6
09:59 ely-se the problem with DWIM is that it doesn't know what you mean
09:59 Amnez777- joined #perl6
10:01 sortiz "Flat" and "Flatten" are a well defined words.
10:01 gfldex the main problem is that operators return LoLs even if you don't want them to _and_ there is no in place list destructuring beside flat, so you have to use a points or sub to get the destructuring
10:02 gfldex s/points/pointy/
10:02 sortiz BTW, I don't expect deep flattening, neither
10:03 gfldex i would expect deep flattening if i ask for it and prefer slippy versions of metas
10:03 espadrine_ joined #perl6
10:03 gfldex m: sub infix:<|Z>(List:D \l, List:D \r){ gather for l Z r -> [\re, \le] { take re; take le; } }; dd (1,2,3) |Z <a b c d>;
10:03 camelia rakudo-moar 775271: OUTPUT«(1, "a", 2, "b", 3, "c").Seq␤»
10:04 gfldex m: dd (1,2,3) Z <a b c d>; # <-- this can be hard to chain with other metas
10:04 camelia rakudo-moar 775271: OUTPUT«((1, "a"), (2, "b"), (3, "c")).Seq␤»
10:04 sortiz Yes, right. I seen your comments about it yesterday.
10:05 gfldex m: dd ((1,2,3) Z <a b c d>).join
10:05 camelia rakudo-moar 775271: OUTPUT«"1 a2 b3 c"␤»
10:05 gfldex and it's hard to chain with methods aswell
10:05 pfortuny joined #perl6
10:05 pfortuny uffff. I am running a multithreaded code and having issues with opening files for writing...
10:06 pfortuny Failed to open file [...]: no such file or directory
10:06 ely-se Sounds like a race condition.
10:06 pfortuny BUT it is open "$filename", :w
10:06 pfortuny and the filename is unique
10:07 avalenn_ is there any emacs mode for perl6 ?
10:07 pfortuny but what I do not understand is why "no such file"
10:07 pfortuny avalenn_: yep, in one of the packages
10:08 pfortuny avalenn_: https://github.com/hinrik/perl6-mode
10:09 avalenn pfortuny: thank you
10:09 pfortuny avalenn: not at all.
10:11 sortiz The other problem that I see, is that people are accustomed to use "@foo" in signatures, temps, etc., and they expect the pre GLR behavior.
10:11 jaffa4 joined #perl6
10:11 jaffa4 hi all
10:11 jaffa4 I have a code the worked previously
10:12 jaffa4 Type check failed in binding @rec; expected 'Positional' but got 'Hash'  the codei is :  for @.tokens -> @rec .....
10:17 RabidGravy jaffa4, @.tokens is an array of Hashes?
10:17 sortiz Yes, to bind to anything with a @ sigil, you need something that implements that role, and for the % sigil an Associative.
10:17 jaffa4 yes
10:19 ely-se m: my %h := { a => 1 };
10:19 camelia rakudo-moar 775271: ( no output )
10:19 RabidGravy not sure how it would have worked before but changing that to %rec should do
10:19 ely-se m: my @h := { a => 1 };
10:19 camelia rakudo-moar 775271: OUTPUT«Type check failed in binding; expected Positional but got Hash␤  in block <unit> at /tmp/KgRxg8oNOc line 1␤␤»
10:20 sortiz Or use a simple $ (Scalar), that works too.
10:22 cpage_ joined #perl6
10:24 sortiz Unless you need the "special" semantic of @ or %, a simple scalar is good container of any type.
10:26 pfortuny ely-se: surprising (?) if I protect the open() with a lock, the issue seems to go away
10:26 pfortuny fascinating because the names are unique always
10:26 pfortuny is there any explanation for this?
10:26 RabidGravy without seeing the code no
10:27 pfortuny yep, but the code is a mess...
10:27 pfortuny I've tried to simplify it but the issue goes away
10:27 zakharyas joined #perl6
10:28 RabidGravy are you doing this in a .tap (or whenever block) on a supply?
10:28 pfortuny in a tap
10:28 RabidGravy if .tap then change it to .act
10:28 pfortuny oh!
10:29 pfortuny nope.
10:29 RabidGravy ..tap will run them as fast as they come in .act will only run one at a time
10:29 pfortuny it also fails
10:29 konobi ooohhh... fun with backpressure
10:29 pfortuny which means?
10:29 RabidGravy thus demonstrating how hard it is to speculate on code that you haven't seen
10:30 pfortuny :D
10:30 pfortuny :DDDDD
10:30 pfortuny thanks anyway, the lock thing fixed it and it serves because it is only for the "open"
10:30 ely-se if the code is a mess then there's no hope fixing bugs in it. clean it up first
10:30 pfortuny no, it is a mess because of all the things I need to do
10:30 pfortuny inside the tap
10:31 pfortuny (and because the async process I am running IS a mess: maxima)
10:31 pfortuny but I am tied up to it
10:31 RabidGravy consider using a whenever instead
10:32 pfortuny what would that do? (sorry novice here)
10:32 konobi pfortuny: reading faster than you can deal with stuff coming in
10:32 RabidGravy potentially distributing work via other supplies
10:32 pfortuny ??
10:32 RabidGravy react { whenever $supply { } }
10:32 pfortuny ah, I see. I'll try that.
10:32 pfortuny konobi: mind explaining a bit?
10:33 RabidGravy in certain applications it might make the code neater at least
10:33 pfortuny thanks a lot, RabidGravy !
10:34 konobi pfortuny: mmm... tricky to explain... lemme see if I can find some docs
10:34 pfortuny what I am doing is just trying to open a file to save the output of a process in it.
10:34 pfortuny each process has a file and I save the output there
10:35 pfortuny but for whatever reason, sometimes, after some iterations, the open($fname, :w) fails
10:35 pfortuny with a "No such file or directory" (mind this message!)
10:35 konobi ah, sorry... yeah, i was just recalling an issue that was had with this async behaviour before
10:36 pfortuny the funny thing is the file DOES NOT exist and I simply want to create it...
10:36 konobi RabidGravy: know if the supplies can apply backpressure?
10:36 pfortuny however, if I Lock.protect the open(), everything works.
10:36 RabidGravy there's a throttle
10:37 RabidGravy pfortuny, is the $fname or the resulting handle in a scope outside the tap?
10:37 konobi mmm... backpressure is a little different, a plain throttle wouldn't cover it
10:37 RabidGravy sure
10:38 pfortuny RabidGravy: the $fname is local to the tap, the resulting handle is necessarily (for me) defined outside
10:39 RabidGravy but throttle does have a mechanism for passing, "woaaaah back off for a bit messages"
10:39 pfortuny the handle (an array) is in the global scope of the file.
10:39 RabidGravy you almost certainly *do* need the lock then
10:40 pfortuny even if I am sure that the race will not happen?
10:40 pfortuny sure as in "impossible"
10:40 pfortuny (not "just pretty sure")
10:41 pfortuny (not that I mind, certainly)
10:41 konobi RabidGravy: ah... supply gives a large file as fast as it can to the next thing, which encrypts, then that writes to disk
10:41 konobi you'd end up blowing your stack without backpressure
10:42 RabidGravy anyway must awah to the supermarket
10:43 pfortuny thanks konobi & RabidGravy
10:43 domidumont joined #perl6
10:47 CurtisOvidPoe joined #perl6
10:48 CurtisOvidPoe Is there a module to pretty print data structures?
10:48 DrForr github.com/drforr/perl6-pp is a start.
10:48 Juerd Open for discussion and testing: https://github.com/rakudo/rakudo/pull/688
10:48 stmuk_ Data::Dump too
10:49 stmuk_ and probably one or two others
10:50 stmuk_ http://doc.perl6.org/language/faq#How_can_I_dump_Perl_6_data_structures_%28like_Perl_5_Data%3A%3ADumper_and_similar%29%3F
10:50 CurtisOvidPoe *resolve stage failed for Pretty::Printer: Project Pretty::Printer not found in the ecosystem)
10:52 stmuk_ its not in the ecosystem
10:52 DrForr Probably haven't added it.. or the usual broken META.info that I've been copying 'round.
10:52 * DrForr looks.
10:52 DrForr yep, broken.
10:54 DrForr Fixed, pushed. Need to add .travis.yml as well.
10:55 jaffa4 this does not work push @tokens, [$(%starts_ends{$prevpos}),$prevpos, $_];
10:56 jaffa4 r: print "hello"
10:56 camelia rakudo-jvm 6c0f93, rakudo-moar 775271: OUTPUT«hello»
10:56 brrt joined #perl6
10:56 jaffa4 r: my @d; push @d,[1,2,3]; push @d,[4.5.6]; say @d.perl;
10:56 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Malformed postfix call␤at /tmp/tmpfile:1␤------> 3my @d; push @d,[1,2,3]; push @d,[4.5.7⏏6]; say @d.perl;␤»
10:56 camelia ..rakudo-jvm 6c0f93: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/tmpfile:1␤------> 3my @d; push @d,[1,2,3]; push @d,[4.5.67⏏5]; say @d.perl;␤»
10:57 jaffa4 r: my @d; push @d,[1,2,3]; push @d,[4,5,6]; say @d.perl;
10:57 camelia rakudo-jvm 6c0f93, rakudo-moar 775271: OUTPUT«[[1, 2, 3], [4, 5, 6]]␤»
10:58 jaffa4 bug in the compiler
10:59 gfldex m: my @d; push @d,|(1,2,3); push @d,|(4,5,6); say @d.perl;
10:59 camelia rakudo-moar 775271: OUTPUT«[1, 2, 3, 4, 5, 6]␤»
10:59 gfldex jaffa4: nope
10:59 jaffa4 I mean in version This is perl6 version 2015.09 built on MoarVM version 2015.09
10:59 gfldex m: my @d; append @d,[1,2,3]; append @d,[4,5,6]; say @d.perl;
10:59 camelia rakudo-moar 775271: OUTPUT«[1, 2, 3, 4, 5, 6]␤»
11:00 gfldex or you use the right method
11:00 DrForr jaffa4: That's from what, October of last year? Maybe update if you can.
11:00 gfldex back then it was by design
11:00 jaffa4 there is no windows version
11:01 jaffa4 installer
11:02 DrForr Like I said, if you can.
11:03 stmuk_ in hindsight pre 6.c releases probably should have exited after Dec 25th :)
11:06 stmuk_ https://git-man-page-generator.lokaltog.net/
11:12 perlawhirl joined #perl6
11:12 maslan joined #perl6
11:14 sortiz m: my @d; @d.push: 1,2,3,4; @d.push: 5,6,7,8; say @d; # Without unneeded ( nor [
11:14 camelia rakudo-moar 775271: OUTPUT«[1 2 3 4 5 6 7 8]␤»
11:15 virtualsue joined #perl6
11:19 perlawhirl hi perlers
11:19 ELBeavers joined #perl6
11:19 perlawhirl can i multi method with a role ?? What's the signature
11:19 perlawhirl m: role T { multi method t (Str) { "STRING" } }; my $i = 'foo' but T; say $i.t;
11:19 camelia rakudo-moar 775271: OUTPUT«Cannot call t(Str+{T}: ); none of these signatures match:␤    (Str+{T} $: Str, *%_)␤  in block <unit> at /tmp/16r7MKc6dH line 1␤␤»
11:22 gfldex m: role T { multi method t (Any:D \s:) { "STRING" } }; my $i = 'foo' but T; say $i.t;
11:22 camelia rakudo-moar 775271: OUTPUT«STRING␤»
11:23 CurtisOvidPoe Any critique of my Perl 6 style is welcome: https://gist.github.com/Ovid/43c131642b82f202d977
11:23 gfldex perlawhirl: ^^^
11:26 gfldex m: role T { multi method t (Str:D \s:) { "STRING" } }; my $i = 'foo' but T; say $i.t;
11:26 camelia rakudo-moar 775271: OUTPUT«STRING␤»
11:26 gfldex likely better
11:28 perlawhirl gfldex: thanks! playing around now
11:29 perlawhirl what does the \s: mean?
11:29 gfldex \s means binding and the : means "left of me is the invocant"
11:31 azawawi joined #perl6
11:31 azawawi hi
11:32 CurtisOvidPoe p6: sub foo {my @a = 1,2; my @b = 3,4; return @a, @b}; my (@c,@d) = foo(); say @c.perl
11:32 camelia rakudo-moar 775271: OUTPUT«[[1, 2], [3, 4]]␤»
11:32 CurtisOvidPoe How do I stop @c from slurping up both arrays?
11:32 azawawi https://github.com/azawawi/perl6-magickwand/blob/master/examples/01-hello.pl6  # ImageMagick in Perl 6 :)
11:34 CurtisOvidPoe Or maybe I phrased that poorly. In my above example, I’d like @a to be assigned to @c and @b to be assigned to @d. What did I do wrong?
11:38 gfldex p6: sub foo {my @a = 1,2; my @b = 3,4; return $@a, $@b}; for foo() -> @c, @d { dd @c; dd @d }
11:38 camelia rakudo-moar 775271: OUTPUT«Array @a = [1, 2]␤Array @b = [3, 4]␤»
11:38 gfldex CurtisOvidPoe: i believe what you want is NYI
11:39 jnthn m: role T { multi method t() { "STRING" } }; my $i = 'foo' but T; say $i.t
11:39 camelia rakudo-moar 775271: OUTPUT«STRING␤»
11:39 jnthn Why the sig at all?
11:39 gfldex p6: sub foo {my @a = 1,2; my @b = 3,4; return $@a, $@b}; my ($c, $d) = foo(); dd $c, $d;
11:39 camelia rakudo-moar 775271: OUTPUT«Array $c = $[1, 2]␤Array $d = $[3, 4]␤»
11:39 CurtisOvidPoe Ah, thanks. That seems strange, but OK :)
11:40 jnthn sub foo {my @a = 1,2; my @b = 3,4; return @a, @b}; my (@c, @d) := foo(); say @c.perl; say @d.perl
11:40 jnthn m: sub foo {my @a = 1,2; my @b = 3,4; return @a, @b}; my (@c, @d) := foo(); say @c.perl; say @d.perl
11:40 camelia rakudo-moar 775271: OUTPUT«[1, 2]␤[3, 4]␤»
11:40 jnthn CurtisOvidPoe: Use binding to get "what a signature would do"
11:41 CurtisOvidPoe jnthn: thank you :)
11:42 gfldex CurtisOvidPoe: in your example you could do:
11:42 gfldex m: sub n(){Nil}; while my $line = n() // False { say 'never ever!' }
11:42 camelia rakudo-moar 775271: ( no output )
11:42 DrForr Oh, Olson, how do I hate thee. Let me count the ways: 0,1,1:15,2,3:30...
11:45 gfldex CurtisOvidPoe: why do you need the .defined? Can linenoise return something that is undefined but True?
11:46 CurtisOvidPoe joined #perl6
11:46 CurtisOvidPoe gfldex: I just used the code from the Linenoise synopsis.
11:47 cc9989 joined #perl6
11:49 sortiz jnthn, It's supposed that Failure.handled to be visible? According to http://doc.perl6.org/type/Failure#method_handled, yes but not in the current implementation.
11:50 gfldex CurtisOvidPoe: it will return Str (what is undef and False), see: https://github.com/hoelzro/p6-linenoise/blob/master/lib/Linenoise.pm.in#L84
11:50 CurtisOvidPoe gfldex: thanks.
11:51 perlawhirl gfldex: why doesn't it work with arrays...
11:51 perlawhirl m: role T { multi method t (Any:D \s:) { "ARRAY" } }; my @i = ('foo') but T; say @i.t;
11:51 camelia rakudo-moar 775271: OUTPUT«Method 't' not found for invocant of class 'Array'␤  in block <unit> at /tmp/lHvjqNjdYF line 1␤␤»
11:51 perlawhirl m: role T { multi method t (Array:D \s:) { "ARRAY" } }; my @i = ('foo') but T; say @i.t;
11:51 camelia rakudo-moar 775271: OUTPUT«Method 't' not found for invocant of class 'Array'␤  in block <unit> at /tmp/RlWm9moWsq line 1␤␤»
11:52 gfldex you try to bind it to the wrong kind of container
11:52 gfldex @a <-- not Array but a container of type Array
11:52 gfldex m: role T { multi method t (Array:D $s:) { "ARRAY" } }; my @i = ('foo') but T; say @i.t
11:52 camelia rakudo-moar 775271: OUTPUT«Method 't' not found for invocant of class 'Array'␤  in block <unit> at /tmp/JFFWI2meqY line 1␤␤»
11:54 _mg_ joined #perl6
11:55 gfldex m: role T { multi method t () { "ARRAY" } }; my $i = Array.new('foo') but T; say $i.t
11:55 camelia rakudo-moar 775271: OUTPUT«ARRAY␤»
11:55 gfldex m: role T { multi method t () { "ARRAY" } }; my @a := Array.new('foo') but T; say @a.t
11:55 camelia rakudo-moar 775271: OUTPUT«ARRAY␤»
11:56 gfldex perlawhirl: i would be careful with mixin into array containers. To me that does not make sense.
11:56 gfldex or better it's unclear if you want to mixin into the Array or the values inside the array
11:57 pfortuny joined #perl6
11:59 perlawhirl gfldex: thanks. i'm not sure i would ever use it. just poking around in the some corners of the language
12:00 CurtisOvidPoe Using https://gist.github.com/Ovid/43c131642b82f202d977, the first time I try to fetch data from a table with ~ 10K rows, it says “Cannot invoke this object (REPR: Null)(gen/moar/m-CORE.setting 3959 sink-all)”. The second time I try it (in the same session) it works just fine. Sound familiar to anyone?
12:03 ely-se joined #perl6
12:12 moritz CurtisOvidPoe: vaguely familiar, but I don't know what's wrong
12:12 moritz nor how to fix it :(
12:13 cognominal joined #perl6
12:14 jaffa4 when I use panda when I run './rakudobrew build-panda' it responds 'No version set' -
12:14 CurtisOvidPoe moritz: ah well. No worries. It will eventually sort itself out :)
12:14 jaffa4 could anyone tell me what is the solution?
12:16 ely-se jaffa4: "build panda", not "build-panda"
12:17 jaffa4 it makes no difference
12:17 kid51 joined #perl6
12:18 azawawi jaffa4: why are you doing a './rakudobrew' not 'rakudobrew' ?
12:18 moritz jaffa4: what verison of rakudo did you build?
12:18 jaffa4 I d not know
12:18 jaffa4 WHat should I?
12:19 moritz jaffa4: what did you type to build a rakudo, and when did you do it?
12:19 kaare_ joined #perl6
12:19 jaffa4 I get the same message
12:20 jaffa4 if I try to build rakudo
12:20 jaffa4 I have a version of rakudo which I installed outside of rakudobrew
12:21 moritz jaffa4: what do you type to build rakudo?
12:21 Skarsnik joined #perl6
12:23 jaffa4 ok, it works for now
12:24 moritz jaffa4: what did you do to make it work?
12:25 jaffa4 not sure yet.. I am building rakudo through rakudobrew
12:25 jaffa4 that works
12:27 moritz you said earlier you get the same message when you build rakudo
12:27 moritz oh, never mind
12:28 azawawi moritz: https://github.com/azawawi/perl6-magickwand/blob/master/examples/01-hello.pl6 # more fun with Perl 6 :)
12:29 moritz azawawi: :-)
12:30 Skarsnik azawawi, you dont need to 'sudo apt-get install libmagickwand-dev' that was the point of having the version number x)à avoiding the need to devel package x)
12:30 azawawi i know :)
12:31 Skarsnik And hello
12:31 azawawi and hi :)
12:31 azawawi gptrixie does not work on imagewand api btw :)
12:31 Skarsnik hm
12:32 Skarsnik how it fail?
12:32 brrt joined #perl6
12:33 azawawi unbox exception when i tried on /usr/include/ImageMagick/wand/magick-image.h
12:33 Skarsnik wow
12:33 Skarsnik that a weird error to have
12:35 azawawi i think it has to do with the extern MagickBoolType func1, funct2, ...;  block
12:37 azawawi Skarsnik: also the module name needs to be clearer a bit... i did not know about your excellent work until i read the readme
12:41 Skarsnik constant are compiled?
12:43 Skarsnik It keep me the value of a constant as it was at precomp time
12:44 moritz of course
12:44 moritz they are constant after all :-)
12:45 Skarsnik err
12:46 Skarsnik root@testperl6:/home/skarsnik/devel/perl6-gumbo# PERL6_GUMBO_LIB=/usr/local/lib/libgumbo.so.1 perl6 -I lib t/01_basic.t
12:46 Skarsnik 1..5
12:46 Skarsnik Cannot locate native library '/usr/local/lib/liblibgumb.so':
12:46 DrForr "Constants aren't, variables won't, functions don't."
12:47 Skarsnik That a bit bad when the constant is like that: constat LIB = %*ENV<> || ('gumbo', v1)
12:47 Skarsnik DBIish has that btw
12:47 Skarsnik It should not be compiled when it depend on a variable x)
12:47 jnthn constant is defined as "evaluated at BEGIN time"
12:48 jnthn If you don't want that behavior, use my \foo = ... instead.
12:48 Skarsnik in my case it keep the value it has when compiled, not BEGIN
12:48 jnthn BEGIN time *is* compile time
12:49 jnthn That's the difference between BEGIN and INIT
12:49 Skarsnik I am pretty sure lot of people will fail for it
12:50 Skarsnik it should have a name more like static
12:51 ely-se lol
12:51 jnthn "I didn't bother to learn this language properly. Why doesn't it read my mind?"
12:51 ely-se because the motto is DWIM
12:51 jnthn Well, it does exactly what *I* mean :D
12:52 CurtisOvidPoe Why is it when I type “perl6 --doc Linenoise”, I get the warning “Could not open Linenoise. Failed to stat file: no such file or directory”. Linenoise *is* installed and I’m using it with no problem.
12:53 Skarsnik constant is not in the doc
12:54 gfldex Skarsnik: it is. It's just well hidden: https://doc.perl6.org/language/5to6-nutshell#constant
12:54 CurtisOvidPoe Or is that not the way to print documentation for the code?
12:54 Skarsnik jnthn, I think it will be confusing for people since script are not precompiled, only modules are
12:55 jnthn Skarsnik: At the moment, at least :)
12:55 Skarsnik and I need to patch DBIish x)
12:55 Skarsnik It's a wonder we did nave complain about that
12:56 Skarsnik but it's not really documented so..
12:56 jnthn Yeah, needs documenting to mention it's BEGIN time
12:56 jnthn lunch &
12:57 Skarsnik hm, I can't export a sigilless var?
12:58 moritz you can't export and import vars
12:58 moritz not in a way that does what you mean
12:58 Skarsnik well it work for constant x)
12:59 moritz but those are, well, constant
12:59 moritz which is not *quite* the same as a variable
13:00 gfldex i didn't try but i believe you could export a Proxy, what will looks surprisingly like a variable
13:01 timotimo o/
13:01 xpen joined #perl6
13:02 Skarsnik azawawi, hm, how did you run gptrixie on the header, it does not get pass gccxml for me
13:04 Skarsnik weird error btw x)
13:04 Skarsnik Term definition requires an initializer
13:04 Skarsnik at /home/skarsnik/devel/perl6-gumbo/lib/Gumbo/Binding.pm6:16
13:04 Skarsnik ------>   my \GUMBO_LIB⏏ is export = %*ENV<PERL6_GUMBO_LIB> || (
13:05 azawawi GCC-XML version 0.9.0
13:05 azawawi gcc 4.8.4
13:06 virtualsue joined #perl6
13:06 Skarsnik /usr/include/ImageMagick-6/wand/magick-image.h:26: error: 'WandExport' does not name a type
13:06 dalek doc: 568651e | (Wenzel P. P. Peppmeyer)++ | doc/Language/terms.pod:
13:06 dalek doc: doc constant
13:06 dalek doc: review: https://github.com/perl6/doc/commit/568651e8c1
13:06 timotimo Skarsnik: can you even use "is export" on a backslashed var like that?
13:06 Skarsnik probably missing an include path
13:07 Skarsnik I try with our but it complain that it's not implemented
13:07 azawawi gptrixie /usr/include/ImageMagick/wand/magick-wand.h
13:07 ELBeavers joined #perl6
13:10 lnrdo joined #perl6
13:10 CurtisOvidPoe How do I view the documentation of an installed module?
13:11 maslan joined #perl6
13:11 Skarsnik perl6doc?
13:12 CurtisOvidPoe Skarsnik: there is no such command that I see.
13:12 CurtisOvidPoe I thought it was “perl6 —doc …”, but that’s not it either.
13:12 gfldex CurtisOvidPoe: NYI
13:13 Skarsnik I am pretty most of modules does not have a doc outside the readme.. so
13:13 CurtisOvidPoe 15 years and we still don’t have perldoc for Perl 6? o_O :)
13:16 Skarsnik azawawi, hm, I can't get it run. I tried on MagickWand.h
13:19 stmuk_ CurtisOvidPoe: p6doc should work as of earlier in the week
13:19 Skarsnik ok, I really need exclusion in gptrixie: -Functions: 2362
13:19 Skarsnik probably a lot from stdlib and pthread x)
13:20 stmuk_ assuming the module actually has pod in it .. otherwise App::ecoreadme might help
13:20 stmuk_ since it pulls the GH README often used
13:21 RabidGravy joined #perl6
13:23 CurtisOvidPoe I just successfully installed p6doc, got “Command not found”. Eventually found it in /Users/curtispoe/.rakudobrew/moar-nom/install/share/perl6/site/bin/p6doc, but when I run it on Linenoise, I get “Type check failed in binding %RESOURCES; expected Associative but got Nil”
13:23 stmuk_ you need to 'rakudobrew rehash'
13:24 CurtisOvidPoe stmuk_: thanks, that lets my shell find p6doc, but I still get the error message for ‘p6doc Linenoise’
13:24 stmuk_ ok I'll try it
13:26 stmuk_ yeah I get the same error its probably because its nativecall not pure perl6 I'll take a look
13:27 CurtisOvidPoe Cheers :)
13:28 Skarsnik hm, it's actually annoying that the native trait has his param evaluated at compile time
13:30 Ven joined #perl6
13:30 RabidGravy Skarsnik the same applies for all traits
13:30 Ven o/, #perl6
13:30 timotimo well, i can see reasons for properly setting up %*RESOURCES even when "just" extracting docs
13:30 RabidGravy I can't see how it could be much different to be hones
13:31 Skarsnik I really prefer to write my $LIB = %*ENV<PATH_TO_LIB> || ('foo', v1) and is native($LIB); that giving it a sub for it
13:31 RabidGravy constant
13:31 Skarsnik constant keep it compile time value
13:31 Skarsnik so it does not work
13:31 stmuk_ hmmm  P6DOC_DEBUG=1 suggests a rakudo rather than p6doc bug :/
13:32 sortiz CurtisOvidPoe, for panda installed modules use: p6doc -I Module
13:32 Skarsnik I think I will add a nativecall-register-lib function to allow to just say is native xD
13:33 Skarsnik or something like that
13:34 ely-se m: subset Slug of Str where /<[a..z0..9-]>+/; my Slug $s = 'hello-world';
13:34 camelia rakudo-moar 775271: ( no output )
13:34 CurtisOvidPoe sortiz: is that a -l? If so, I just get a usage message, not the docs
13:35 stmuk_ sortiz: there is no -I option to p6doc
13:35 Skarsnik or nativecall-register-lib('foo', something the native trait take); and is native('foo'); what do you think RabidGravy? x)
13:36 stmuk_ I added -l sometime this week and it's intended to list modules
13:36 sortiz See: https://github.com/perl6/doc/commit/ac1285c558619eb6154219035f55c21567781c43
13:38 stmuk_ the problem is that perl6 --doc as called by p6doc is errring
13:39 treaki joined #perl6
13:41 sortiz Sorry for the confusion, I see I not l
13:41 timotimo i suppose the problem is that we have to run --doc on the source (because of DOC phasers and such), but we also have to set up everything the same way it would've been set up when first installing the module (hence %RESOURCES)
13:41 timotimo that's ... a little difficulty that has to be addressed
13:42 Skarsnik damn, I can't export a constant that point to a sub?
13:42 timotimo you ... can't?
13:42 Skarsnik m: module A { our constant B is export = sub { say foo}}; &B;
13:42 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xPu2K8e6Lj␤Undeclared routine:␤    foo used at line 1␤␤»
13:42 Skarsnik m: module A { our constant B is export = sub { say "foo"}}; &B;
13:42 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YICELtfcp9␤Can't use unknown trait 'is export' in a sub declaration.␤at /tmp/YICELtfcp9:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
13:43 timotimo oh, huh
13:43 timotimo m: module A { our constant Foo is export = "hi"; }; import A; Foo;
13:43 camelia rakudo-moar 775271: OUTPUT«WARNINGS for /tmp/9kfLz4aJI9:␤Useless use of constant value Foo in sink context (line 1)␤»
13:43 timotimo m: module A { our constant Foo is export = "hi"; }; import A; say Foo;
13:43 camelia rakudo-moar 775271: OUTPUT«hi␤»
13:43 timotimo m: module A { our constant Foo is export = sub :: { say "yo"; 1 }; }; import A; say Foo;
13:44 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DvxhTtafIB␤Can't use unknown trait 'is export' in a sub declaration.␤at /tmp/DvxhTtafIB:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
13:44 MadcapJake Skarsnik: why do you need to export it, just put that sub right in Binding.pm6
13:44 timotimo seems like the "is export" lands in the wrong spot
13:44 Skarsnik because I don't want to deal with a sub name x)
13:45 [Coke] (licensing, same as) Please don't say "same as perl". Please explicitly say which license you're using for your user's sanity.
13:45 [Coke] *users'
13:45 Skarsnik x)
13:45 ZoffixWin m: module A { my &x = sub { say "foo"}; our constant B is export = &x}; import A; B;
13:45 MadcapJake why not just `constant LIB = sub { %*ENV<PERL6_GUMBO_LIB> || ('gumbo', v1) }`
13:45 camelia rakudo-moar 775271: OUTPUT«WARNINGS for /tmp/UUbFPQw6Kt:␤Useless use of B symbol in sink context (line 1)␤»
13:45 Skarsnik I say same as Rakudo, see the LICENCE file x)
13:46 ZoffixWin m: module A { my &x = sub { say "foo"}; our constant B is export = &x}; import A; B();
13:46 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/J_m33oEy6H␤Target type too complex to form a coercion type␤at /tmp/J_m33oEy6H:1␤------> 3onstant B is export = &x}; import A; B()7⏏5;␤»
13:46 azawawi https://github.com/azawawi/perl6-magickwand/blob/master/examples/01-hello.pl6   # side-by-side original image + filtered image in Perl 6 :)
13:46 Skarsnik azawawi, give a screen shot!
13:48 azawawi http://pasteboard.co/Z6ccvsJ.png
13:48 Skarsnik MadcapJake, close but the native trait do not do magic when you give him a Callable (like transforming gumbo to libgumbo.so)
13:49 pierre-vigier joined #perl6
13:49 * ZoffixWin twitches
13:50 ZoffixWin Some people, I tell you... This person is complaining about my article saying one would still need to learn Perl 6 when I said "For the most part, there's no need to learn some new arcane thing to hack on the innards of the compiler."
13:50 azawawi ZoffixWin: what article? and hi :)
13:51 ZoffixWin azawawi, http://blogs.perl.org/users/zoffix_znet/2016/01/perl-6-is-written-in-perl-6.html
13:51 ZoffixWin And the comment is on reddit: https://www.reddit.com/r/perl/comments/4254yf/perl_6_is_written_in_perl_6/cz7p5w8
13:51 MadcapJake Skarsnik: what about `do if %*ENV<PERL6_GUMBO_LIB> -> $lib { $lib } else { ('gumbo', v1) }`
13:52 pierre-vigier joined #perl6
13:52 Skarsnik hm
13:53 azawawi ZoffixWin: thx
13:53 Skarsnik m: use NativeCall; my \LIB = ('foo', v1); sub foo is native(LIB) {*};
13:53 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pffKOypNCU␤Can't use unknown trait 'is native' in a sub declaration.␤at /tmp/pffKOypNCU:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
13:53 Skarsnik that's weird?
13:54 DrForr "But...but.. if perl6 is written in perl 6 then I need to learn Perl 6 before I can learn perl 6...*boom*"
13:54 azawawi DrForr: :)
13:55 Skarsnik ok I am confused
13:55 [Coke] Skarsnik: as long as you include a copy of the LICENSE file, all is good. thanks. :)
13:55 Skarsnik m: use NativeCall; my $LIB = ('foo', v1); sub foo is native($LIB) {*};
13:55 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/v3FPVmq_Bi␤No appropriate parametric role variant available for 'NativeCall::Native'␤at /tmp/v3FPVmq_Bi:1␤»
13:56 ZoffixWin m: use NativeCall; my $LIB = ('foo', v1); sub foo is native(|$LIB) {*};
13:56 camelia rakudo-moar 775271: ( no output )
13:56 Skarsnik m: use NativeCall; my $LIB = ('foo', v1); say $LIB.WHAT; sub foo is native($LIB) {*};
13:56 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H1V35R_si8␤No appropriate parametric role variant available for 'NativeCall::Native'␤at /tmp/H1V35R_si8:1␤»
13:56 stmuk_ the Linenoise pod isn't parsed by perldoc (p5) either
13:56 Skarsnik m: use NativeCall; my $LIB = ('foo', v1); say $LIB.WHAT;
13:56 camelia rakudo-moar 775271: OUTPUT«(List)␤»
13:57 Skarsnik hm
13:57 stmuk_ is "=begin pod" valid perl5 pod?
13:57 Skarsnik m: use NativeCall; my $LIB = ('foo', v1); say $LIB.WHAT; sub foo is native(('foo', v1)) {*};
13:57 camelia rakudo-moar 775271: OUTPUT«(List)␤»
13:58 Skarsnik I don't get why putting lib does not work
13:58 ZoffixWin stmuk_, yes
13:58 Skarsnik The role accept List
13:58 Peter- ZoffixWin, Looks like they didn't get the end of your post, if they had then their comment wouldn't make much sense
13:59 ZoffixWin Peter-, I think some people just like making noise....
14:00 * [Coke] reads http://www.infoworld.com/article/3024248/application-development/get-to-know-perl-6.html?nsdr=true which is positive but not quite right on some details. Woolfy++ for posting the biggest one in the comment section.
14:01 ZoffixWin stmuk_, though, the standard `perldoc` command doesn't parse it. That is, `=begin pod` is a valid POD command that says "This section is in format 'pod'", but perldoc isn't looking for 'pod' format sections.
14:01 ZoffixWin (just tested)
14:01 stmuk_ ZoffixWin: that explains why perldoc can't parse Linenoise.pm although podchecker says its valid
14:02 Skarsnik gah now I get the $precomp-id error x)
14:02 MadcapJake m: use NativeCall; my @LIB = ('foo', v1); say @LIB.WHAT; sub foo is native(@LIB) {*};
14:03 camelia rakudo-moar 775271: OUTPUT«(Array)␤»
14:05 lnrdo joined #perl6
14:05 MadcapJake Skarsnik: it works with a @ sigil ^
14:05 _Vi joined #perl6
14:07 Skarsnik hm, what can I do when precomp stop working?
14:07 stmuk_ turn it off and on again?
14:08 domidumont joined #perl6
14:08 virtualsue joined #perl6
14:08 _mg_ joined #perl6
14:09 dalek perl6-most-wanted: 6f5608a | RabidGravy++ | most-wanted/modules.md:
14:09 dalek perl6-most-wanted: Rename CouchDB
14:09 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/6f5608ace5
14:09 pierre-vigier joined #perl6
14:10 Skarsnik I delete the lib/.precomp and now it complain that it can't find a dep
14:11 lnrdo joined #perl6
14:16 harrison_ joined #perl6
14:18 skids joined #perl6
14:20 FreezerburnV joined #perl6
14:21 FreezerburnV joined #perl6
14:24 RabidGravy I concluded that renaming ^ was going to stop me worrying about it
14:25 Skarsnik ?
14:25 RabidGravy Seeing as I've been working very very slowly on it since April it needs to get fixed
14:31 sjoshi joined #perl6
14:32 azawawi what Perl 6 type can be convert to num64?
14:33 RabidGravy any that has a .Num as far as I know
14:35 azawawi m: sub foo(num64 $x} { $x.say }; foo(10.0);
14:35 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9laqE94AuM␤Malformed parameter␤at /tmp/9laqE94AuM:1␤------> 3sub foo(num64 $x7⏏5} { $x.say }; foo(10.0);␤    expecting any of:␤        constraint␤»
14:36 azawawi m: sub foo(num64 $x) { $x.say }; foo(10.0);
14:36 camelia rakudo-moar 775271: OUTPUT«This type cannot unbox to a native number␤  in sub foo at /tmp/Y5xGQjZ7vn line 1␤  in block <unit> at /tmp/Y5xGQjZ7vn line 1␤␤»
14:36 jnthn Needs to be a Num
14:36 arnsholt Try 10.0e0
14:36 jnthn m: sub foo(num64 $x) { $x.say }; foo(10e0);
14:36 camelia rakudo-moar 775271: OUTPUT«10␤»
14:37 arnsholt azawawi: Perl 6 decimal constants without exponent are rationals, not floating point objects
14:37 azawawi i see thx
14:37 timotimo "anything that has a .Num" isn't enough if the .Num doesn't end up getting called :)
14:37 jnthn Right, types in Perl 6 are (by default) constraints, not coercions :)
14:42 Ven m: class A {has Int $.x is rw;}; my A $a .= new; $a.x = 5; say $a.x
14:42 camelia rakudo-moar 775271: OUTPUT«5␤»
14:42 Ven ely-se: ^^
14:42 ely-se m: class A { has Int $x; }; my A $a .= new; $a.x = 5; say $a.x
14:42 camelia rakudo-moar 775271: OUTPUT«Method 'x' not found for invocant of class 'A'␤  in block <unit> at /tmp/C85R195gQq line 1␤␤»
14:42 ely-se Ven: ^^
14:43 ely-se ugh I missed the .
14:43 ely-se whatever
14:43 Ven $x is $!x there :P
14:43 Hathersage joined #perl6
14:43 arlenik_ joined #perl6
14:43 ely-se m: class A { has Int $.x; }; my A $a .= new; $a.x = 5; say $a.x
14:43 camelia rakudo-moar 775271: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/GdKPVw4Y5X line 1␤␤»
14:45 jnap can someone point me at a good P6 regex guide?  I'm playing with the DOM::Parser module that zoffxx started but getting in a bit over my head with the regex stuff.  Honestly regex was never a strong point for me in P5 either :)
14:45 azawawi http://pasteboard.co/Z9TfaSL.png  # charcoal effect in Perl 6 :)
14:46 awwaiid nice
14:47 awwaiid jnap: http://doc.perl6.org/language/grammars most of the things about grammars are also about regexes, if that helps
14:47 jnap ok so that is still considered canonical then?
14:47 jnap I wasn't totally sure :)
14:47 awwaiid hmm. but htat doc is too short
14:48 jnap maybe there's test cases in the p6 repo
14:48 jnthn There's http://doc.perl6.org/language/regexes too
14:48 awwaiid any place where doc.perl6.org is not canonical, it is a bug
14:48 jnap lol, but I'd never know :)
14:48 jnap if the docs are right or not...
14:48 jnap ok I'll start with that and complain if things don't seem to match up
14:49 MadcapJake docs are currently the most up-to-date source
14:50 harryirene joined #perl6
14:52 lnrdo joined #perl6
14:53 FROGGS joined #perl6
14:53 eyck joined #perl6
14:55 molaf joined #perl6
14:55 sufrostico joined #perl6
14:56 ELBeavers joined #perl6
15:02 Skarsnik RabidGravy, and other NC user. what do you think of https://gist.github.com/Skarsnik/3da8fbf2d7532ca06bdd
15:02 xpen joined #perl6
15:04 dylanwh joined #perl6
15:04 [Coke] I never saw an answer to what #perl6-release is for; it's for talking about how we're going to deal with releases going forward. (how to figure out which spec we're using. are we going to have a five-like model of dev & stable releases, or have a single rakudo compiler each month that has both dev & stable? How does the release process have to change? what do we do with roast after the initial christmas cut,
15:04 [Coke] maybe we need to re-arrange how we store the version of the spec...)
15:05 FROGGS [Coke]: it is a on-topic channel about all of these things
15:06 domidumont joined #perl6
15:06 RabidGravy Skarsnik, seems sensible to me
15:06 [Coke] Are you just agreeing with me? Can't parse the intent of your send.
15:06 FROGGS [Coke]: I am agreeing yes
15:07 FROGGS [Coke]: I opened this channel so we can discuss 2016.01 and all the issues that need to be resolved for it
15:07 stmuk_ . o O ( 2016.02 surely )
15:07 arnsholt Skarsnik: I'd prefer not to overload the native treat to take both a registered name and library name
15:08 [Coke] stmuk_: it's not too late... but it's probably almost too late.
15:08 FROGGS yeah
15:08 [Coke] and that's fine. I'd rather the next release be solid.
15:08 lokien_ joined #perl6
15:08 Skarsnik arnsholt, hm, why?
15:09 arnsholt It's an unnecessary ambiguity in the arguments of the trait
15:09 RabidGravy maybe it would be better if it returned some "handle" object
15:09 stmuk_ BTW I'm considering releasing an unofficial MSI (probably just 2015.12 + panda ) this weekend unless anyone is very opposed
15:09 arnsholt Yeah, that could work
15:10 arnsholt Then you could use multidispatch to distinguish is native(Str) and is native(Handle)
15:10 gfldex stmuk_: you can only improve the situation
15:10 FROGGS you can also declare you orn 'is gumbo' trait that applies the 'is native' trait
15:10 FROGGS own*
15:10 arnsholt Oooh, hadn't thought of that. That's a pretty good idea too
15:11 RabidGravy alternatively if the register could be made to load the dll then the arguments can be omitted altogether
15:11 Skarsnik the is native trait took a scalar, it the role behind call a sub that does something with this scalair x)
15:12 Skarsnik RabidGravy, The issue with that, I need to change code in nqp or more I think
15:12 [Coke] stmuk_: I am pretty sure we'll have a rakudo * by the end of the first week of february.
15:12 [Coke] (for 2016.xx) that will include only non-spec-breaking bugfixes and improvements.
15:13 Skarsnik and for the handle solution. I am not sure how you can do that since the trait is solved at compile time
15:14 arnsholt Oh, that's true. But that means that *your* sketched solution won't work either, actually
15:14 Skarsnik it work
15:14 Skarsnik I just code it xD
15:14 stmuk_ [Coke]: OK
15:15 arnsholt If your implementation works, a Handle approach will work equally well
15:15 [Coke] I know nine is on vacation this week, I'm currently the only volunteer for executing releases, and I have a big dayjob thing I'm trying to close the deal on. :)
15:15 Skarsnik the is native trait just apply a parametred Native role to the sub. it's when you call the sub for the first time that the argument is really solved
15:16 arnsholt Oh, you're relying on that, of course. That sounds like a bad idea, TBH
15:16 Skarsnik arnsholt, I mean if you write my $handle = register-lib; is native($handle) it will fail since $handle is non typed at compile time
15:16 arnsholt Yeah, that's true. But I really don't think the way you're going about it is a very good idea either
15:17 arnsholt Since it relies on something quite specific happening after compile-time. You can't actually sanity-check it at compile-time
15:18 Skarsnik sanity check what? x)
15:19 n0tjack joined #perl6
15:20 jnthn fwiw, my expectation was that is native(SomeType) would work some day, where SomeType implements some API used to do library resolution.
15:21 arnsholt Yeah, that sounds more reasonable
15:21 Skarsnik I am not how you want to use that
15:22 dylanwh joined #perl6
15:23 |Tux| Shhhhh
15:24 |Tux| csv-ip5xs       17.723
15:24 |Tux| test            22.432
15:24 |Tux| test-t          11.937
15:24 |Tux| csv-parser      50.247
15:24 |Tux| http://tux.nl/Talks/CSV6/speed4.html + http://tux.nl/Talks/CSV6/speed5.html
15:25 Skarsnik I am not what you mean. You can't solve library issue at compile time. And having to define a special type sound annoying to write
15:26 abraxxa Skarsnik: finally took the time to rebase my fork of DBIish, PR is updated now
15:26 Skarsnik nice :)
15:26 jnthn |Tux|: Fist under 12? :)
15:27 jnthn Uh, first!
15:27 jnthn Skarsnik: No, the point is that you pass the object to the trait at compile time, but it can call methods on it at runtime
15:27 ely-se joined #perl6
15:31 azawawi Skarsnik: any luck with that bug for gptrixie & imagewand header files?
15:32 Skarsnik I don't have the same bug
15:32 MadcapJake Skarsnik: you could build the module file on install and place the absolute path that way.
15:33 Skarsnik All I want is to have my user be able to set and ENV to change the library path
15:33 Skarsnik I can do that if I pass a sub to the native trait
15:33 dylanwh joined #perl6
15:33 Skarsnik but its sucks
15:33 MadcapJake why does it suck?
15:34 azawawi http://www.imagemagick.org/api/magick-image.php # Gonna write a parser to take out documentation/header and then feed it to gptrixie :)
15:34 Skarsnik because it's ugly?
15:35 bowtie joined #perl6
15:35 dylanwh joined #perl6
15:35 azawawi "Once ImageMagick version 7 is released, we will continue to support and enhance version 6 for a minimum of 10 years."
15:36 azawawi :)
15:37 azawawi ImageMagick v7 is expected on 1st Q 2016.
15:38 Skarsnik I am updated the gist with a libhandle type
15:38 Skarsnik but not sure if that could work
15:39 Zero_Dogg joined #perl6
15:39 jme` joined #perl6
15:39 Zero_Dogg joined #perl6
15:40 Skarsnik azawawi, try smething like: perl6 -I lib bin/gptrixie --all /usr/include/ImageMagick-6/wand/magick-wand.h -I /usr/include/ImageMagick-6/ -I /usr/include/i386-linux-gnu/ImageMagick-6/ ?
15:45 azawawi Skarsnik: started it in gptrixie git repo... still parsing :)
15:45 Skarsnik take like a minute
15:46 Skarsnik because there is lot of stuff included
15:46 azawawi Skarsnik: "doing magic" on ImageMagick :)
15:46 Skarsnik huhu
15:47 azawawi died in functions... printed constants
15:48 |Tux| jnthn, YES!
15:48 laz78 joined #perl6
15:49 Skarsnik This error I guess?
15:49 Skarsnik Method 'name' not found for invocant of class 'GPT::Class::PointerType'
15:49 Skarsnik in sub resolve-type at /root/piko/cpp/gptrixie/lib/GPT/DumbGenerator.pm6 line 71
15:51 sammers joined #perl6
15:52 virtualsue joined #perl6
15:52 azawawi Skarsnik: yup
15:53 Skarsnik I don't get this error (seems like a bt error or something)
15:54 azawawi bt = bluetooth? :)
15:54 azawawi or backtrace :)
15:54 Skarsnik backtrace
15:57 Skarsnik if you want it fail on a $type ~~ Something && $type.name; but if I displa $type ~~ Something, it false x)
15:57 dylanwh joined #perl6
16:02 * azawawi enables Mac OS X Travis CI testing for ImageMagick
16:03 Skarsnik oh, it's new?
16:05 azawawi Skarsnik: https://travis-ci.org/azawawi/perl6-magickwand/jobs/104123346
16:06 AlexDaniel joined #perl6
16:09 Skarsnik Oh it was a BT error
16:09 Skarsnik the issue is on the next line
16:10 mr-foobar joined #perl6
16:11 Zero_Dogg Is there any method that I can use to wait for a command started with IO.run to finish, other than busy-waiting?
16:12 lnrdo joined #perl6
16:12 jnthn Zero_Dogg: .close the handle(s) you opened
16:12 jnthn uh, output ones
16:12 jnthn iirc
16:13 jnthn That blocks until process exit
16:13 Skarsnik should I repport?
16:13 Skarsnik m: https://gist.github.com/Skarsnik/6bff05010aa08d1b7869
16:13 camelia rakudo-moar 775271: OUTPUT«Method 'piko' not found for invocant of class 'Any'␤  in block <unit> at /tmp/bnUfbGZxf_ line 4␤␤»
16:13 Skarsnik it should point to line 5
16:13 ugexe closing the run handle too early sometimes seems to cause segfaults of its own
16:14 jnthn Skarsnik: It's part of a statement starting on line 4, and line reporting is at statement level iirc
16:14 Zero_Dogg jnthn: If I might need to read .err, and don't redirect .out and .in though?
16:15 jnthn Zero_Dogg: You'd only have to close the ones you said you wanted
16:16 jnthn At least, that's how I remember it working... :)
16:16 jnthn ugexe: Reported somewhere, I assume?
16:17 khw joined #perl6
16:17 Skarsnik jnthn, yes that what I figured that it stop at the whole statement, but should I repport at LTA? It cost lot of time debugging for nothing xD
16:18 Skarsnik +me
16:19 jnthn Skarsnik: You can, it may not be too hard to fix
16:19 ugexe jnthn: dunno. i dont send reports myself unless i have a better idea of what to point to though
16:19 Zero_Dogg jnthn: but I won't have any to close. If I don't redirect in/out, those aren't present, and If I might need to read .err, I can't close that
16:19 stmuk Stage parse      : 183.238 (maybe I should have spent more than 150 euro-buck-quids on a windows build box)
16:19 jnthn Zero_Dogg: But if you're reading from it then those reads block
16:19 Zero_Dogg jnthn: ah, right
16:20 Zero_Dogg jnthn: thanks
16:23 abraxxa1 joined #perl6
16:25 sftf joined #perl6
16:29 skyl4rk joined #perl6
16:32 Skarsnik azawawi, update gptrixie, it work fine now (and have fun, it give me nearly 5000 lines)
16:40 maslan joined #perl6
16:40 * azawawi runs "zef --force install App::GPTrixie"
16:41 cc9989 joined #perl6
16:52 psy_ joined #perl6
16:53 psy_ joined #perl6
16:55 hankache joined #perl6
16:57 hankache hello #perl6
16:57 Juerd Hello hankache
16:57 hankache hi Juerd
17:00 leont joined #perl6
17:06 telex joined #perl6
17:08 azawawi Skarsnik++ # thx :)
17:09 Skarsnik excluding std/pthread stuff is my todo list x)
17:10 Skarsnik I will need it for c++ that a simple include <string> is like 30 additionnals headers x)
17:14 azawawi hmm, MacOS X travis CI containers are faster to boot/run vs linux precise builds
17:15 mcmillhj joined #perl6
17:16 xtreak joined #perl6
17:16 nadim joined #perl6
17:25 jack_rabbit joined #perl6
17:25 Calibellus joined #perl6
17:26 sjoshi joined #perl6
17:31 RabidGravy Oooh I didn't know there were MacOS containers
17:31 domidumont joined #perl6
17:32 RabidGravy is it a fairly standard OS build?
17:34 azawawi can one depend on more than version in a native trait e.g. is native('libfoo', v1, v2)  etc?
17:35 sortiz azawawi, Nop.
17:35 RabidGravy no, but it would be quite cool if you could, I don't think there's a particularly good story around that
17:35 azawawi and if one removes the version, one gets a warning...
17:35 RabidGravy yes
17:36 azawawi what's the point of having symbolic links / ABI compatiblity
17:36 geekosaur ?
17:36 sortiz Unless you use a Str with a full path, so no version is checked.
17:36 geekosaur the .so without the version selects what version you link against at compile time; it's not an ideal solution but it works
17:36 sortiz Not when a Callable is involved.
17:37 sortiz s/Not/NOr/
17:37 lnrdo joined #perl6
17:37 geekosaur runtime, i's not that comon to be able to assert wih certainty that you can hande multiple major versions, unless the library developer is unclear on the concept o API versioning
17:38 domidumont joined #perl6
17:38 RabidGravy azawi, if want to support more than one version I guess you could create a subroutine that tests for the particular versions in much the same way as LibraryCheck checks for the library and returns the one it finds
17:39 RabidGravy azawawi, ^
17:39 RabidGravy typing too fast
17:39 azawawi im already looking at it :)
17:39 RabidGravy cool
17:40 azawawi e.g. i have libmagickwand4 and libmagickwand5 to support which are in the 6.x range (precise...trusty)
17:42 * geekosaur wants :api which could in theory take a range
17:42 geekosaur still need to put that whole thing together
17:42 azawawi https://docs.travis-ci.com/user/languages/perl6     # still has rakudobrew build-panda
17:43 geekosaur (see irc discussion ca. 12 hours ago, and list email from early to mid December)
17:43 azawawi geekosaur: yup i remember reading that irc log
17:48 ely-se joined #perl6
17:50 TimToady joined #perl6
17:54 ely-se Oh boy, writing a type checker in Perl 6.
17:57 leont joined #perl6
18:06 perl6newbee joined #perl6
18:16 moritz \o/ a rather well-regarded German IT print magazine just asked me if I want to write for them about Perl 6
18:16 moritz I did that in 2009 once already
18:16 moritz (iX by heise.de)
18:16 RabidGravy GWAN! DO IT!
18:20 RabidGravy m: role Foo { method bar() { say "jjsjs"; }}; my @a does Foo; @a.bar; # is there a way of doing this for an @!attribute without getting jiggy with a trait?
18:20 camelia rakudo-moar 775271: OUTPUT«jjsjs␤»
18:21 moritz RabidGravy: I will :-)
18:22 _nadim joined #perl6
18:24 RabidGravy yay!
18:25 molaf joined #perl6
18:26 RabidGravy the dumbest solutions are best:
18:26 RabidGravy m: class Foo is Array { method bar() { say "jjsjs"; }}; class Bar { has  @.a is Foo; }; Bar.new.a.bar
18:26 camelia rakudo-moar 775271: OUTPUT«jjsjs␤»
18:28 musiKk joined #perl6
18:29 [Coke] moritz: nice to have articles written by people who actually know what's going on. :)
18:29 moritz [Coke]: sounds like you're not talking about me :-)
18:30 moritz ok, so now I have to summarize 7 years of Perl 6 development. Yikes.
18:30 RabidGravy shit happened, it's groovy and works now
18:32 ELBeavers joined #perl6
18:35 stmuk does linenoise work on windows?
18:40 hoelzro stmuk: yes
18:40 hoelzro I just tested it with the latest rakudo as of wednesday
18:40 ely-se m: subset T of Str
18:40 camelia rakudo-moar 775271: ( no output )
18:40 ely-se does that default to where { True }?
18:41 hoelzro ely-se: I believe so
18:41 stmuk I see Cannot locate symbol 'linenoiseSetCompletionCallback' in native library 'C:\rakudo\share\perl6\site\resources\54D0D684007FC0E71CAE12C86E5266F79B48B13A.dll' with 2015.12
18:41 hoelzro m: subset T of Str; my S $s = ''
18:41 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5===␤Type 'S' is not declared␤at /tmp/lQ2AhStefU:1␤------> 3subset T of Str; my S7⏏5 $s = ''␤Malformed my␤at /tmp/lQ2AhStefU:1␤------> 3subset T of Str; my7⏏5 S $s = ''␤␤»
18:41 hoelzro m: subset T of Str; my T $s = ''
18:41 camelia rakudo-moar 775271: ( no output )
18:41 hoelzro stmuk: dammit, Hotkeys had that same problem...which version of Windows are you on?
18:42 hoelzro FROGGS and I also found that at the SPWS, before I knew Linenoise worked on windows
18:42 stmuk windows 10 .. I'm using a v old VS2010 I admit
18:42 hoelzro hmm
18:42 hoelzro I have it working on win10...but using mingw
18:43 addison_ joined #perl6
18:43 PerlJam moritz: write for them one time about Perl 6 or regularly?
18:44 moritz PerlJam: one time
18:44 PerlJam I was so hoping for the latter  :)
18:45 moritz http://perlgeek.de/blog-en/perl-6/perl-6-in-2011.html "for example the mandelbrot fractral generator used to take 18 minutes to run on a machine of mine, and now takes less than 40 seconds"
18:45 maslan joined #perl6
18:45 moritz the fractal generator now runs in 2.4s
18:46 moritz (on a machine that's from 2006 or so, so it's not just hardware :-)
18:48 Djibril joined #perl6
18:48 moritz and adding two "int" annotations speeds it up to 1.4s
18:50 PerlJam That might make a good story for others to support jnthn's grant.
18:54 * sjn is looking at rosettacode examples
18:54 sjn http://rosettacode.org/wiki/Multiline_shebang#Perl_6 doesn't work any more :-\
18:54 RabidGravy moritz for reference it runs in 0.64 seconds here
18:55 RabidGravy this is a five year old i7
18:57 RabidGravy tiny weeny little mandelbrot though
18:57 * [Coke] points at https://twitter.com/cokefloats/status/690609264424042500
18:58 PerlJam [Coke]++
18:58 [Coke] PerlJam++
18:59 * [Coke] got an email, a text, and an alert on his watch from perljam's retweet. :)
18:59 mspo [Coke]: you are subscribed
19:01 addison__ joined #perl6
19:03 kmel joined #perl6
19:06 kmel joined #perl6
19:07 Actualeyes joined #perl6
19:09 hankache joined #perl6
19:14 RabidGravy [Coke], retweeted (twice for good measure ;)
19:16 gfldex S11 claims: It is also possible to re-export the imported symbols:
19:16 gfldex use Sense :EXPORT;
19:16 gfldex is that implemented?
19:17 autarch1 joined #perl6
19:20 moritz I don't think so
19:20 PerlJam gfldex: see https://github.com/perlpilot/p6-Test-Class/blob/master/lib/Test/Class.pm6#L6
19:22 moritz ok, please help me brainstorm: what's the key points of development in Perl 6 since 2009?
19:22 moritz nom/MOP, moarvm, concurrency, Graphemes come to mind
19:23 laz78 joined #perl6
19:23 PerlJam those are the big ones
19:24 PerlJam GLR too
19:24 RabidGravy Oooh, PerlJam++ it never occurred to me that I could do that
19:43 jnthn moritz: After learning how not to build a Perl 6 compiler, we finally wrote one in a rightish way :)
19:43 * jnthn considers nom the turning point
19:44 maslan joined #perl6
19:45 moritz jnthn: I'm going to quote you on that :-)
19:46 azawawi https://github.com/perl6/roast/blob/master/S32-io/IO-Socket-INET.t#L25      # Maybe broken since on linux
19:48 azawawi m: say $*DISTRO.name;
19:48 camelia rakudo-moar 775271: OUTPUT«opensuse␤»
19:49 azawawi so how does one determine that he's running on darwin, linux, ...etc
19:49 jnthn m: say $*KERNEL.name
19:49 camelia rakudo-moar 775271: OUTPUT«linux␤»
19:50 jnthn Maybe the test file should use that
19:50 sjn \o
19:50 hankache o/
19:51 moritz oh, I guess in 2009 we didn't have much gradual typing either, did we?
19:51 moritz I mean, compile time checks of types and stuff
19:53 azawawi moritz: so this is basically skipped on linux https://github.com/perl6/roast/blob/master/S32-io/IO-Socket-INET.t#L25
19:54 RabidGravy If I wanted to re-export a trait would I do something like "sub EXPORT { { '&trait_mod:<is>' = &trait_mod:<is>.dispatcher }}
19:59 pmurias joined #perl6
19:59 pmurias is the type system we have in Perl 6 really gradual typing? it seems like we don't really have a static type system just type checks
19:59 jnthn moritz: No, we didn't have much that relies on interseting BEGIN time pre-nom :)
20:00 jnthn pmurias: Certainly
20:00 jnthn pmurias: The natives are handled in a very static way
20:01 timotimo well, hopefully we'll have a lot more compile-time type checking at some point, but ... with the way our method calls are complete wildcards ...
20:01 arnsholt Like much of type-related discussion, I guess it depends on what you mean by types and such
20:01 jnthn I don't expect to statically check method calls in general
20:01 jnthn OO is muchly about late binding.
20:02 jnthn The lexical = early bound, object = late bound distinction is fairly fundemental in Perl 6.
20:03 pmurias arnsholt: a lot of the gradual typing seems to be about having both a "typical" static type system and mixing it with dynamic typing
20:03 timotimo right. well, method calls are late-bound in C++, too, but the way derived classes are strongly restricted in what their method signatures and return types may be is A Thing
20:03 pmurias Perl 6 seems more about sprinkling a bunch of type check to check if things are sane
20:04 arnsholt pmurias: Right. Perl 6 comes at it from the other direction, adding types to a dynamic system
20:04 arnsholt Whether those two things should have different names is a fair question, I guess =)
20:05 jnthn I think both are fair to call gradual typing
20:07 timotimo so, i was wondering: if we have something like AClassLiteral.new( :named-arg ); would it be sensible to do the "does the constructor we end up calling actually take that named?" check then?
20:09 autarch1 left #perl6
20:12 jnthn Usually not 'cus the default new just delegates to bless
20:13 ely-se joined #perl6
20:13 timotimo well, if we know the default is in use, we can go introspecting the BUILDALLPLAN
20:15 timotimo that'll conveniently also tell us if there's custom BUILD methods involved
20:17 pmurias it would be fun if at some point it was possible to import a static type system from CPAN
20:18 jnthn pmurias: Should be possible, especially once the slang stuff lands.
20:21 * sjn likes "optional typing"
20:22 * ely-se doesn't
20:23 ely-se too hard to tell what can be relied on
20:24 RabidGravy is there any prior-art in the ecosystem or elsewhere for "Array that gets a promise from the objects it stores and deletes any when the promise is kept"?
20:25 masak RabidGravy: you want the array to *automatically* delete elements?
20:25 RabidGravy yeah
20:25 masak ...why?
20:26 masak I mean, usually I prefer my data structures to stay still when I'm not looking at them
20:26 moritz jnthn: uhm, from reading the git logs in the nqp and MoarVM repos, it looks like you started MoarVM in 2012, and JVM interop in Rakudo landed later, in 2013. Is that right? Or am I missing something?
20:26 * moritz surprised
20:26 masak moritz: that's how I remember it
20:26 pmurias ely-se: isn't it pretty clear in Perl 6 what can be relied on?
20:27 ely-se no.
20:27 ely-se nor in other "optionally typed" languages like TypeScript and Dart
20:27 moritz masak: I guess my surprise stems from the fact that I learned about MoarVM much later
20:28 timotimo masak: sounds more like he wants just a collection, not necessarily an ordered one
20:28 [Coke] note that the moarvm repo was private for a while.
20:28 jnthn moritz: Yes, MoarVM was develoepd in secret for a while
20:29 jnthn 'cus I'd no idea how it'd go :)
20:29 RabidGravy well I have an object which has a list of other contained objects, the objects can be created by name, but it seems natural to have a .delete method on each object
20:29 jnthn And wanted to design in at my own pace and in peace. :)
20:29 Skarsnik azawawi, what is the name of imagemagic lib?
20:29 RabidGravy and because the object has been deleted it shouldn't be in the containing object any more
20:29 timotimo imagemagick, usually
20:30 jnthn And if I came up with nothing interesting, then I'd not have disappointed everyone. :)
20:30 jnthn Happily, everything worked out well. :)
20:30 Skarsnik I mean the so files )
20:30 moritz jnthn: aye :-)
20:31 * jnthn bbt :)
20:31 timotimo gnite jnthn
20:31 azawawi Skarsnik: you mean magickwand or core lib?
20:32 Skarsnik hm libmagickcore-6.q16-2: /usr/lib/i386-linux-gnu/libMagickCore-6.Q16.so.2
20:32 Skarsnik look likeit a case of the need for pkg-config probably
20:32 RabidGravy so in terms of pseudo-code I want to be able to do "my $d =  $f.things[0]; ..... ; $d.delete; # and removed from $f.things
20:32 ely-se that sounds like quite a terrible design
20:33 ely-se you're coupling a value to an array it happens to be an element of
20:33 khw joined #perl6
20:33 masak jnthn++ # MoarVM, and I'm not sure I've given karma for that yet, but it's definitely deserved
20:33 ely-se cyclic dependences like these are often a sign of unnecessary complexity
20:33 timotimo actually, the element can notify multiple arrays of its deletion wish
20:33 moritz RabidGravy: maybe you should give us a broader view of what you want to achieve
20:35 moritz well, thinking more about it, if you structure it as an element that can be deactivated, and views on arrays that consider only active elements, it doesn't sound too crazy anymore
20:35 timotimo just make sure iteration over the array makes sense when things get kicked out
20:37 RabidGravy It's a list of databases in couchdb, having the .delete makes sense on the representation of the individual db, I just want to save having to refetch them all
20:37 moritz RabidGravy: does it need to be an ordered list?
20:38 RabidGravy (which would require signalling the higher level object in some other way anyway )
20:38 RabidGravy no
20:38 moritz if talk about "pools" instead of "arrays", things sound less spooky to me :-)
20:38 moritz *if you
20:39 RabidGravy yeah sure
20:40 moritz and no, I don't think there's something premade for it
20:44 Skarsnik any though on plop2 https://gist.github.com/Skarsnik/3da8fbf2d7532ca06bdd ?
20:45 firstdayonthejob joined #perl6
20:47 RabidGravy actually, thinking about it, it's more of a pain in the arse than it's worth as you'd have to over-ride push append, shift and all the key access
20:47 azawawi m: say $*VM.config<dll>
20:47 camelia rakudo-moar 775271: OUTPUT«lib%s.so␤»
20:47 * RabidGravy goes for a brute force method
20:48 moritz "when in doubt, use brute force"
20:48 ely-se that's *not* what she said
20:49 _Vi joined #perl6
20:49 moritz ely-se: no, what did she say? :-)
20:49 ely-se "use Perl 6"
20:50 Skarsnik azawawi, there is a $*DISTRIB I think
20:50 moritz ely-se: fairynuff
20:54 Skarsnik hm, what was the syntax to say what an arg on main is for? pod why? like #| hello?
20:54 Amendil joined #perl6
20:55 azawawi https://travis-ci.org/azawawi/perl6-magickwand  # build passing on travis ci linux and osx :)
20:56 RabidGravy azawawi++ # go! go! go!
20:56 Skarsnik nice
20:58 Skarsnik azawawi, hm major version for me is 2
20:59 Skarsnik well it's imagemagick3 on debian stable, probably why
20:59 Skarsnik *graphicmagick
20:59 Skarsnik or this one? libmagickwand-6.q16-2: /usr/lib/i386-linux-gnu/libMagickWand-6.Q16.so.2
21:01 azawawi this one
21:01 azawawi this is a wrapper for magickwand C-based API
21:02 azawawi http://www.imagemagick.org/script/magick-wand.php
21:04 Skarsnik you can do use NativeCall :ALL; return guess_library_name((LIB, v4)) in your lib stuff x)
21:04 azawawi i see... thanks
21:04 Skarsnik if you don't want to bother doing the plateform translation
21:05 azawawi but is it a stable API?
21:05 maslan joined #perl6
21:06 Skarsnik well originaly it exportable for me to write test x)
21:06 xpen joined #perl6
21:08 Skarsnik You can try $*VM.platform-library-name($libname.IO, :version(v5).Str; it will probably not be changed
21:08 fireartist joined #perl6
21:11 pi1 joined #perl6
21:12 azawawi Skarsnik: if you think about it, Travis CI/Appveor are good tool to test on various platforms provided you're pushing commits. When the commit rate slows and core API changes, it is bound to fail without notifying the module author
21:12 ugexe it has to be changed
21:12 RabidGravy I'm going to have make an exception called TeenSpirit so I can have a "throws-like { ...}, TeenSpirit;"
21:12 Skarsnik xD
21:13 azawawi One needs to restart CI builds every 1 day at least to have good testing results vs latest
21:13 azawawi s/latest/rakudo latest/
21:14 Begi joined #perl6
21:14 Begi Hi. I've a question : If I write a second module for Gravatar, will it be accecpted ?
21:14 Skarsnik Gravatar?
21:15 Begi to generate avatar from an email
21:15 Begi a simple API
21:15 * azawawi wonders how fast is the average fail test report time on cpan testers when there is a breaking change in one of the module's dependencies / Perl
21:15 RabidGravy Begi, why would anyone?  After all there are four JSON parsers and five HTTP clients, the more the merrier ;-)
21:16 Skarsnik Begi, probably ask the author of the first if you want a different API?
21:16 Skarsnik still no breaking UA into 2 modules?
21:18 Begi Sorry, I've not time. I'll look that later. Thansk and good night #per6 !
21:20 lnrdo joined #perl6
21:22 ely-se m: class A { has B $.x; }; class B { }
21:22 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5===␤Type 'B' is not declared␤at /tmp/I_ABsAbGzH:1␤------> 3class A { has B7⏏5 $.x; }; class B { }␤Malformed has␤at /tmp/I_ABsAbGzH:1␤------> 3class A { has7⏏5 B $.x; }; class B { }␤␤»
21:22 ely-se any nice way to do this without moving definition of B before definition of A?
21:25 timotimo just have class B { ... } in front of class A
21:25 timotimo that's how you declare stubs in p6
21:26 ely-se ah ok
21:27 laz78 joined #perl6
21:27 ely-se then I get a redeclaration error at the non-stub definition
21:28 timotimo then you didn't spell it "..."
21:28 timotimo m: class B { ... }; class A { has B $.x; }; class B { }
21:28 camelia rakudo-moar 775271: ( no output )
21:30 ely-se I absolutely did.
21:30 timotimo that's strange
21:30 timotimo can you show the code?
21:31 timotimo hopefully it's not a nasty bug :S
21:31 ajr_ joined #perl6
21:32 ajr_ In P5 "die message\n" kills the program without specifiying the line number. Where can I find the P6 equivalent?
21:35 timotimo note "oh no!"; exit(1);
21:35 Skarsnik ely-se, if it's in two separate file it does not work x)
21:35 masak ajr_: what timotimo said. I usually define a subroutine for that.
21:36 Timbus joined #perl6
21:38 moritz m: class X::WithoutLineNumber is X::AdHoc { method Str { $.payload } }; die X::WithoutLineNumber.new(payload => "message")
21:38 camelia rakudo-moar 775271: OUTPUT«message␤  in block <unit> at /tmp/5qEPIvzW2V line 1␤␤»
21:38 moritz m: class X::WithoutLineNumber is X::AdHoc { method gist { $.payload } }; die X::WithoutLineNumber.new(payload => "message")
21:38 camelia rakudo-moar 775271: OUTPUT«message␤»
21:38 moritz that way it's still catchable.
21:43 ajr_ sorry, badly constructed question; I want to RTFM about die, though it looks as though timotimo's answer may be what I want.
21:43 timotimo die is for throwing an exception that can be caught, not for exiting the program :)
21:44 ely-se found the PHP programmer
21:44 moritz http://doc.perl6.org/language/exceptions
21:44 timotimo what do you mean, ely-se?
21:45 ely-se timotimo: in PHP, die exits the program
21:45 timotimo oh
21:45 ely-se this is ironic http://doc.perl6.org/type/X%3A%3AIO%3A%3ADoesNotExist
21:45 ely-se I think it should stay that way forever
21:46 mspo that could be the 404 page
21:49 SmokeMachine___ is there a way to declare a class attribute as lazy?
21:49 ajr_ Thanks, moritz.
21:50 ely-se m: Cool.new.perl.say; Cool.new.say
21:50 camelia rakudo-moar 775271: OUTPUT«Cool.new␤Cool.new␤»
21:50 ely-se m: Cool.new.sqrt
21:50 camelia rakudo-moar 775271: OUTPUT«Cannot call Numeric(Cool: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/4OIdDp0BYO line 1␤␤»
21:51 ajr_ ely-se "die" does that in P5 and P6 - it's just the unwanted line number I was trying to suppress.
21:52 dalek doc: d0dae21 | moritz++ | doc/Language/exceptions.pod:
21:52 dalek doc: Mention way to suppress backtrace
21:52 dalek doc: review: https://github.com/perl6/doc/commit/d0dae211bd
21:52 ajr_ A whole class to do that in P6 seems like a complicated regression.
21:53 sortiz In my module, I want travis uses "trusty" (via dist), but in combo with "language: perl6", "precise" are used! Any ideas?
21:53 Skarsnik this a sub trait to emulate croak x)
21:53 Skarsnik why whould you want to die without the backtrace?
21:54 masak ajr_: you don't need a whole class.
21:54 masak ajr_: just two statements, possibly wrapped in a convenience subroutine.
21:55 ajr_ Maybe I'm misreading your 16:37 message?
21:57 PerlJam SmokeMachine___: you mean you want to delay initialization until first use?
21:57 SmokeMachine___ PerlJam: yes, and if never used, never initialized...
21:57 ajr_ Sorry, masak, I meant moritz's
21:58 SmokeMachine___ PerlJam: just like perl5 moose has' lazy "adverb"...
21:59 PerlJam SmokeMachine___: I think people have done this with a Proxy that replaces itself with the appropriate value.  I don't know of a better way off hand.
22:01 masak ajr_: I'm only now seeing what moritz wrote. still what timotimo wrote only requires two statements, and what I wrote only requires a sub.
22:09 ELBeavers joined #perl6
22:09 geraud joined #perl6
22:10 ajr_ The note/exit construction does what I want. The subtle change in "die" will definitely be a topic for 5->6 training.
22:14 RabidGravy PerlJam, to be honest I've gone with the "has $!foo;  method foo() is rw { if not $!foo.defined { ... } $!foo }" route in a lot of places
22:15 roguelazer joined #perl6
22:15 RabidGravy there's scope for putting that in a trait I guess
22:16 TEttinger joined #perl6
22:17 roguelazer joined #perl6
22:17 timotimo we've had that in core for a few days, then it was supposed to be ripped out and put into a module (literally, you could have 1:1 copy-pasted teh code) but nobody did it
22:17 RabidGravy I have also succeeded with a method !foo in the past
22:19 RabidGravy timotimo, I must have missed it as I'm sure I would have done :)
22:19 timotimo "i'm sure i would have (missed it)" or "i'm sure i would have (made that module)"?
22:19 RabidGravy I would have made the module
22:20 timotimo gimme a minute.
22:21 timotimo bdc66e79daa19d54e2467e65bb97fedb52e08b6e
22:21 timotimo a rakudo commit
22:21 timotimo https://github.com/rakudo/rakudo/commit/bdc66e79daa19d54e2467e65bb97fedb52e08b6e
22:22 addison_ joined #perl6
22:23 * [Coke] posted something to the Perl 6 group on FB about "where's the release". If I get some positive feedback, I'll probably just CNP it to blogs.perl.org
22:23 [Coke] (https://gist.github.com/coke/21c70b50e3cce8d88347 if you want to read it but don't have FB)
22:24 timotimo could you rename gistfile1.txt to gistfile1.md so it soft-wraps the text?
22:27 RabidGravy timotimo¸ that looks entirely doable
22:27 timotimo good luck!
22:27 [Coke] timotimo: done
22:27 timotimo TYVM
22:28 [Coke] timotimo: redone
22:28 timotimo ah, yes
22:28 timotimo i think it'd be good to spell "use v6.c" (or something) out in point 4
22:29 timotimo otherwise people may think they have to "use ThatOneFeature; use ThatOtherFeature; no NotThatFeature;"
22:30 timotimo cool. i really like your text
22:30 [Coke] updatd 4
22:31 Skarsnik Should NC start having version?
22:31 timotimo that's what i was wondering about, too
22:31 [Coke] can it without the 6.c spec changing?
22:31 * [Coke] heads out
22:32 timotimo well, nativecall isn't part of the spec test suite, is it? ;)
22:32 timotimo but we might want to extend versioning out to it anyway
22:32 Skarsnik NC is lacking too much (IMO) to be tagged like 6.c
22:33 Skarsnik but having a version could be nice
22:33 timotimo yeah, NC is amazing, but there's still a ways to go.
22:33 Skarsnik The issue with NC is... (for 6.c stuff) what is tested in nqp/moar that is here for NC
22:34 Skarsnik NC.pm is small
22:34 timotimo that's true
22:37 Skarsnik You will that funny, but lot of NC missing/undef stuff make mad when I work on gptrixie
22:37 Skarsnik like "How I should generate this? There is 2-3 way to solve it"
22:37 Skarsnik I am not even sure how I should handle ref x)
22:40 yqt joined #perl6
22:42 Skarsnik good night #perl6
22:43 addison_ joined #perl6
22:45 masak 'night, #perl6
22:49 timotimo gnite Skarsnik
22:50 sufrostico joined #perl6
22:58 flussence m: use NativeCall; sub MVM_sha1(OpaquePointer $tc, str $str) is native('moar') { * }; say &MVM_sha1()
22:58 camelia rakudo-moar 775271: OUTPUT«NativeCall: Consider adding the api version of the library you want to use, sub foo is native(moar, v1)␤Calling MVM_sha1() will never work with declared signature     Expected: :(NativeCall::Types::Pointer $tc, str $str)␤  in method CALL-ME at /home/ca…»
22:58 flussence some fun LHF: figure out how to make the first error go away ;)
23:01 timotimo doesn't matter, you'll never get a $tc for the currently running program
23:01 timotimo if you do, hmm.
23:06 mr-foobar joined #perl6
23:07 Skarsnik m: use NativeCall; sub MVM_sha1(OpaquePointer $tc, str $str) is native('libmoar.so') { * }; say &MVM_sha1()
23:07 camelia rakudo-moar 775271: OUTPUT«Calling MVM_sha1() will never work with declared signature     Expected: :(NativeCall::Types::Pointer $tc, str $str)␤  in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/sources/075EFE4B4CDAAF73190194EA876F81A1F128D1A2 line 278␤  in block <…»
23:09 leont joined #perl6
23:10 fireartist Any ideas why `prove -e perl6 -lr t` isn't loading from my './lib' directory? I'm trying to run tests on a github project
23:11 Skarsnik PERL6LIB=lib prove ...
23:11 fireartist thanks, I'll try that!
23:11 RabidGravy or prove -e "perl6 -Ilib" ...
23:12 RabidGravy depending on taste
23:12 RabidGravy isn't there a prove6 in the house nowadays?
23:12 fireartist PERL6LIB=lib is working - I can tell by how long it's taking :-)
23:14 fireartist all tests pass - I've just written my first perl6 code since the pugs project was a thing!
23:16 kid51 joined #perl6
23:18 ely-se m: if(True) { say 'hi'; }
23:18 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5===␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens␤at /tmp/m_y8fGCE1Q:1␤------> 3if7⏏5(True) { say 'hi'; }␤Unexpected block in infix position (two terms in a row)␤at /tmp/m_y8fGCE1Q:1…»
23:18 ely-se m: if (True) { say 'hi'; }
23:18 camelia rakudo-moar 775271: OUTPUT«hi␤»
23:18 ely-se does Perl 6 have any reserved words?
23:20 timotimo hm
23:20 timotimo sometimes it's hard to call something "class"
23:20 timotimo without the parser seeing broken class definitions everywhere
23:20 timotimo m: my \class = 10; say class;
23:20 camelia rakudo-moar 775271: OUTPUT«10␤»
23:20 llfourn m: class class {}; say class.new;
23:20 camelia rakudo-moar 775271: OUTPUT«class.new␤»
23:20 llfourn :)
23:20 timotimo m: sub class; say class;
23:20 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/23XS4i05HE␤A unit-scoped sub definition is not allowed except on a MAIN sub;␤Please use the block form.␤at /tmp/23XS4i05HE:1␤------> 3sub class;7⏏5 say class;␤»
23:21 timotimo m: sub class { }; say class;
23:21 camelia rakudo-moar 775271: OUTPUT«Nil␤»
23:21 ely-se I was wondering how best to do reserved words in a grammar so I took a look at STD.pm6 only to find it doesn't do reserved words
23:21 timotimo yeah, it doesn't
23:21 addison_ joined #perl6
23:22 ely-se I don't like to list them over and over again
23:22 llfourn m: Perl, Cool and has class {} with Version, 6
23:22 camelia rakudo-moar 775271: ( no output )
23:22 ely-se so I'll see if I can use some BEGIN trickery of some sort
23:23 ely-se well I don't think I have to actually
23:23 ely-se I only have to list them once
23:23 BenGoldberg joined #perl6
23:28 RabidGravy I knew it would work, I changed the name of the couchdb module to Sofa and I've already got more useful stuff done on it than since I started it in April
23:31 skids joined #perl6
23:35 timotimo good work
23:38 RabidGravy anyway beddy byes for Rabid
23:38 RabidGravy toodles people
23:46 woodruffw joined #perl6
23:47 woodruffw joined #perl6
23:49 ajr_ Is there something native in P6 equivalent to "curl", or should I be looking at ways to execute in a subshell?
23:50 AlexDaniel there is a bunch of modules for this…
23:50 AlexDaniel does anybody know what is the best one?
23:51 AlexDaniel I remember some did not work with https
23:51 llfourn well RabidGravy just updated: https://github.com/sergot/http-useragent
23:53 llfourn I wonder if anyone has written a promise based one
23:53 AlexDaniel there's also https://github.com/shoichikaji/perl6-HTTP-Tinyish and https://github.com/azawawi/perl6-net-curl
23:53 llfourn and LWP::Simple while we're at it
23:54 AlexDaniel yeah
23:55 pierre-vigier joined #perl6
23:57 ajr_ I think I need to execute some commands in a subshell anyway. Pointer to docs, please?
23:57 AlexDaniel ajr_: http://doc.perl6.org/routine/run
23:58 AlexDaniel ajr_: or if you insist on shell then 「shell」 or qx

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

Perl 6 | Reference Documentation | Rakudo