»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:02
araujo left,
araujo joined,
araujo left,
araujo joined
00:05
firstdayonthejob joined
00:07
laz78 left
00:10
firstdayonthejob left
00:12
ZoffixWin joined
|
|||
ZoffixWin | Any idea how to link to the Perl 6 RT queue without getting that stupid "possible cross-site forgery" error? Like this one: rt.perl.org/Public/Search/Results....lled%27%29 | 00:13 | |
(preferably sorted by most recent first) | |||
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:14 | ||
00:18
Sgeo joined,
vinnix left
00:21
go|dfish left
00:25
colomon left
00:27
arlenik joined
|
|||
dalek | c: fbdcc94 | util++ | doc/Language/5to6-perlop.pod: Fixed missing `C` in `C<->` |
00:28 | |
c: 7196c85 | util++ | / (9 files): Fix typos |
|||
c: dcf8944 | util++ | doc/Language/nativecall.pod: Fix typos |
|||
00:28
alwpex left
00:29
ELBeavers joined
00:34
ELBeavers left
|
|||
Juerd | I find myself wanting 'unit react;' :) | 00:36 | |
ZoffixWin | Well volunteered! :D | 00:38 | |
00:39
BenGoldberg joined
00:41
pierre-vigier joined
|
|||
ZoffixWin | New post: blogs.perl.org/users/zoffix_znet/20...erl-6.html | 00:43 | |
00:49
go|dfish joined
00:50
spider-mario left,
cdg left
|
|||
Util | ZoffixWin++ # Excellent blog post; it will be a good reference to explain this aspect of Perl 6's coolness. | 00:53 | |
ZoffixWin | \o/ | ||
Juerd | ZoffixWin: Maybe change that last link to the actual RT queue | 00:58 | |
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
|
|||
Juerd | Aargh | 00:59 | |
Juerd really doesn't like that site. | 01:00 | ||
ZoffixWin | It's terrible indeed. | ||
01:10
espadrine_ left
|
|||
MadcapJake | seems like you can't really position command line arguments with MAIN | 01:11 | |
Juerd | What do you mean by 'position'? | ||
MadcapJake | i'm trying to do «p6dx complete -d <text>» and it won't let me do it that way | 01:13 | |
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
|
|||
Juerd | $m is -d? | 01:15 | |
01:15
skids joined
|
|||
MadcapJake | yeah Juerd, i wrote that wrong, it should be `-m` | 01:15 | |
01:15
laz78 joined
|
|||
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 | ||
MadcapJake | but i don't want to do `--filepath="<filepath>"` | ||
Juerd | I didn't say you should want that :) | ||
MadcapJake | it puts complete last> | 01:17 | |
o_O | |||
Juerd | By the way, why is 'm' required? | ||
MadcapJake | my plan was to have a separate multi for each flag | ||
Juerd | $ perl6 -e 'multi sub MAIN ("complete", $filepath, Bool :$m!) { say "m=$m, fp=$filepath" }' -m complete foo | 01:18 | |
m=True, fp=foo | |||
I don't know why 'complete' can't go before -m though | |||
MadcapJake | yeah | 01:19 | |
i just realized i can do `("complete -m", $filepath)` :D | |||
kind of cheating but it works | 01:20 | ||
Juerd | That'll separate 'complete -m'? | ||
AlexDaniel | ZoffixWin: great post, very motivational | ||
ZoffixWin | \o/ | ||
Juerd | MadcapJake: You'd need to pass complete\ -m or "complete -m" in a shell. | ||
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 | ||
Juerd | Subcommands are a weak spot in MAIN signatures | 01:21 | |
MadcapJake | gah | ||
01:22
llfourn joined
|
|||
Juerd | Maybe Bool :$complete! | 01:23 | |
That would require --complete | |||
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:24 | |
Juerd | Or fix the feature :P | 01:25 | |
Is there any usecase for literals in MAIN's signature, other than subcommands? | |||
Oh, the error message has nothing to do with MAIN | 01:26 | ||
I don't understand what's variadic about "complete" or :$m!, though | |||
MadcapJake | yeah it's just the rule for all signatures | 01:27 | |
Juerd | Apparently, :$m! is considered variadic. But why? | ||
MadcapJake | Juerd: I definitely agree, they should just be treated as positional | ||
i think because it's named | |||
Juerd | Maybe I don't understand the meaning of 'variadic' | ||
MadcapJake | the 'complete' one i don't understand | ||
variadic (i think) just means it's either optional or named | 01:28 | ||
anything with a default value, `?`, or `:` | |||
Juerd | I don't understand why named required is variadic. | ||
01:29
addison left
|
|||
MadcapJake | agreed it's probably either an oversight or something's blocking it from being considered as such | 01:29 | |
01:29
cpage_ joined
|
|||
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 | ||
Juerd | ? | ||
MadcapJake | so even though it's required, it's really not positional so it has to be considered variadic | ||
i don't really know, i'm just guessing xD | |||
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 | ||
Juerd | sub MAIN ("complete", $fp, Bool :$m?) { say "m=$m fp=$fp" } | 01:32 | |
$ perl6 complete.p6 -m complete a | |||
m=True fp=a | |||
1;0 juerd@cxie:~$ perl6 complete.p6 complete -m a | |||
Usage: | |||
complete.p6 [-m] complete <fp> | |||
:( | |||
Put it at the end, and it requires it at the beginning :P | |||
MadcapJake | lol | ||
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 | ||
camelia | rakudo-moar 775271: OUTPUT«Method 'die' not found for invocant of class 'Str' in block <unit> at /tmp/rxeeOk4pKE line 1» | ||
tony-o_ | i win | ||
Juerd | tony-o_: It did die. | ||
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» | ||
Juerd | It dies perfectly. | 01:36 | |
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» | ||
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
|
|||
MadcapJake | how do you see what exports a module has? | 01:48 | |
llfourn | MadcapJake: does the module have unit module blah at the top? | ||
MadcapJake | yeah | ||
01:48
Actualeyes joined
|
|||
tony-o_ | you can access that stuff through GLOBAL::<module>:: | 01:48 | |
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…» | ||
tony-o_ | guess you don't need GLOBAL:: anymore | ||
llfourn | I didn't know you ever did | 01:51 | |
tony-o_ | i don't think that works on non-core modules | ||
llfourn | it should. As long as they have unit module blah | ||
when you put 'is export' it adds it to EXPORT DEFAULT of each package it's in including UNIT:: | 01:52 | ||
so the only caveat is that if 'is export' is not inside a package you won't see it like that | |||
tony-o_ | does that not work on the module A { } syntax? | ||
llfourn | no it should work with that as well | 01:53 | |
I made github.com/LLFourn/p6-CompUnit-Uti...ure-import for other situations | |||
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>; | ||
camelia | rakudo-moar 775271: OUTPUT«sub ok (;; Mu | is raw) { #`(Sub|83321952) ... }» | ||
llfourn | that should work | ||
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:55 | |
01:55
_Vi left
|
|||
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 | ||
declarator* | |||
01:56
_Vi joined
|
|||
MadcapJake | llfourn++ thanks for the help! | 01:56 | |
llfourn | no worries I learnt that trick from someone on here iirc | ||
tony-o_ | llfourn: it's a problem with what i was using to test | 01:57 | |
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 | ||
tony-o_ | i'm for it | 02:00 | |
MadcapJake | xD | ||
i've no idea, iirc it was discussed on here, check the logs: irclog.perlgeek.de/perl6 | 02:01 | ||
02:01
yeahnoob left
|
|||
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
|
|||
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:11
addison left
|
|||
llfourn | sortiz: interesting I didn't know that.. | 02:12 | |
m: module Foo { sub foo() is export {} }; say Foo::EXPORT === UNIT::EXPORT | |||
02:12
captain-adequate left
|
|||
camelia | rakudo-moar 775271: OUTPUT«True» | 02:12 | |
llfourn | hmm maybe we are using === wrongly | 02:13 | |
m: module Foo { sub foo() is export {} }; say Foo::EXPORT =:= UNIT::EXPORT | |||
camelia | rakudo-moar 775271: OUTPUT«False» | ||
llfourn | m: unit module Foo; sub foo() is export {}; say Foo::EXPORT =:= UNIT::EXPORT | 02:14 | |
camelia | rakudo-moar 775271: OUTPUT«False» | ||
sortiz | llfourn, I was that someone. | ||
llfourn | m: unit module Foo; sub foo() is export {}; say UNIT::EXPORT =:= UNIT::EXPORT | ||
camelia | rakudo-moar 775271: OUTPUT«True» | ||
Juerd | MadcapJake: I'm nearing completion on a patch for your command line parsing thing. Would you care to test it? | ||
[Coke] | ZoffixWin++ | ||
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. | ||
ZoffixWin | tony-o_, github.com/perl6/modules.perl6.org...tee.pm#L21 | ||
Juerd | MadcapJake: I think that these changes combined make it better suited for subcommands. | 02:16 | |
llfourn | sortiz: rt.perl.org/Public/Bug/Display.html?id=127305 | ||
02:17
ELBeavers joined
|
|||
llfourn | sortiz: the one who taught me about the Test::EXPORT trick? Yes! Now I remember :) | 02:17 | |
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)» | ||
llfourn | sortiz: what do you mean with regards to UNIT? | 02:21 | |
sortiz | UNIT is a virtual scope, related to the compunit, i.e, file compiled. | 02:22 | |
02:22
ELBeavers left
|
|||
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,
Averna joined
|
|||
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. | ||
llfourn | yep. We need to document and explain this eventually... probably soon. | 02:25 | |
sortiz | So you can only have a "unit" declaration per file, that "aliases" the named package with the current UNIT. | 02:28 | |
02:29
n0tjack left
|
|||
MadcapJake | Juerd: sweet! I'd love too! | 02:30 | |
Gotta get my son ready for bed, i'll be back in about an hour | 02:31 | ||
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
|
|||
Juerd | MadcapJake: You'll still have to put the :$m! at the end, though :) | 02:34 | |
02:37
dfcarpenterak left
|
|||
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 :) | ||
(but it seems good to me!) | 02:38 | ||
sortiz | m: unit module Foo; say Foo::.WHAT, UNIT::.WHAT | 02:40 | |
camelia | rakudo-moar 775271: OUTPUT«(Stash)(PseudoStash)» | ||
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)» | ||
llfourn | or not | ||
m: unit module Foo; BEGIN note UNIT::.keys: # it doesn't work at begin from what I remember | |||
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…» | ||
llfourn | cool. | ||
sortiz | m: say UNIT.WHO # Some more info | 02:43 | |
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)))» | ||
Juerd | MadcapJake: github.com/Juerd/rakudo/commits/nom | ||
llfourn | :: is the same at .WHO afaik | ||
Juerd | MadcapJake: Have fun! :) | ||
02:43
gtodd joined
02:45
n0tjack joined
02:47
kid51 left
|
|||
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:49 | |
02:49
n0tjack left
|
|||
ZoffixWin | Wasn't there a Duration type? | 02:50 | |
hu{TAB}... where's huggable :/ | 02:51 | ||
geekosaur | I thought so | ||
ZoffixWin | yeah | ||
Juerd | m: my $a = now; sleep 2; my $b = now; say ($b - $a).WHAT; | 02:52 | |
camelia | rakudo-moar 775271: OUTPUT«(Duration)» | ||
Juerd | Yes, there are durations! :) | ||
geekosaur | Temporal mentions Instant but not Duration. I don't see where either is defined | ||
ZoffixWin | It is in the type docs, but I don't see any usage docs docs.perl6.org/type/Duration | 02:53 | |
02:53
huggable joined
|
|||
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…» | ||
geekosaur | sigh | ||
02:55
_Vi left
|
|||
gtodd | my $yearsworthofmoments = now + Duration.year() | 02:55 | |
:) | |||
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…» | ||
sortiz | llfourn, is the same iff the invocant is a scope ;) | 02:59 | |
02:59
_Vi joined
03:00
FreezerburnV joined,
Juerd left
|
|||
FreezerburnV | o/ | 03:00 | |
llfourn | sortiz: i know all too well :) github.com/LLFourn/p6-CompUnit-Util#descend-who | ||
03:01
sno left
03:03
colomon joined,
cpage_ left
|
|||
sortiz | llfourn++ # Nice util | 03:04 | |
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 | ||
ZoffixWin | FreezerburnV, I use same as Perl: Artistic 2 | ||
FreezerburnV | Not heard of that one, actually | ||
03:06
Juerd joined
|
|||
ZoffixWin | FreezerburnV, github.com/zoffixznet/perl6-Color/...er/LICENSE | 03:06 | |
Juerd | Meh, connection issues :( | ||
I typed a long line to TimToady; did that get through before I disconnected? | |||
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 | |
Juerd, nope | |||
03:07
yeahnoob joined
|
|||
FreezerburnV | ZoffixWin: Yep, SDL2::Raw. I'll go ahead and do that | 03:07 | |
Juerd | Hurrah for input history then! | ||
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. | |||
ZoffixWin: Thanks | |||
MadcapJake: github.com/Juerd/rakudo/commits/nom in case it got lost in my server's network disconnection | 03:09 | ||
I'm off to bed | 03:10 | ||
03:10
yqt left
|
|||
Juerd | Good night, all(@nicks) | 03:11 | |
ZoffixWin | night | ||
sortiz | night | ||
FreezerburnV | Night! | ||
AlexDaniel | ZoffixWin: so what happened with huggable? | ||
ZoffixWin: did he crash or something? | |||
Juerd | Good any(@times-of-day Z @nicks) | ||
03:12
laz78 left
|
|||
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:12 | |
AlexDaniel | ZoffixWin: dammit… | 03:13 | |
ZoffixWin: actually, I have exactly the same issue with Net::IRC::Bot | |||
03:13
Zero_Dogg left
|
|||
ZoffixWin | Weird. | 03:13 | |
03:14
Zero_Dogg joined
|
|||
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 ? | ||
AlexDaniel | not in that bot | ||
ZoffixWin | hm | ||
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 | ||
geekosaur: yeah, something like that | 03:16 | ||
maybe | |||
geekosaur | *los* of bots seem to die or get stuck when the server goes away | ||
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… | ||
ZoffixWin: if you figure it out, please leave me a note that it is fixed | |||
ZoffixWin | sure | ||
AlexDaniel | thanks | 03:18 | |
03:21
n0tjack joined
|
|||
ZoffixWin | Man, seems C people aren't fans of stuff we Perl folks put into Acme:: | 03:22 | |
Want to play with NativeCall, but having trouble finding some funny C lib to play with | |||
03:26
n0tjack left
03:37
vendethiel joined
03:38
laz78 joined
03:45
noganex joined
03:47
Calibellus left
03:48
noganex_ left
|
|||
MadcapJake | Juerd: multi sub MAIN ('complete', Str $begin, Bool :$m!, Int :$depth) #-> complete -m [--depth=<Int>] <begin> | 03:50 | |
Juerd: perfect! | |||
that's exactly the form i want, string at the end, subcommand at the beginning, flags in the middle | 03:51 | ||
multi sub MAIN ('complete', Str $begin, Bool :$m) #-> complete [-m] <begin> | 03:53 | ||
ZoffixWin | Found a lib to learn NativeCall with (by making a bindings module): liballegro "portable library for cross-platform game and multimedia development" | 03:57 | |
I think this is something I played with a decade ago, when learning C :) Gonna finish what I started lol | 03:58 | ||
04:00
vendethiel left
|
|||
ZoffixWin | or maybe not.. it has a lot of stuff that's not very interesting | 04:01 | |
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:10 | |
And after that error, it will give me an error about something not existing in the .precomps directory | 04:11 | ||
(if I try and run the file again) | |||
I'm on whatever the latest thing rakudobrew installed is (I updated tonight) | |||
04:12
Psyche^ joined
04:17
Psyche^_ left
04:21
arlenik left
04:25
pierre-vigier left
04:26
n0tjack joined
04:31
n0tjack left
|
|||
ZoffixWin | Can you pastebin the actual error and maybe the code too? | 04:33 | |
FreezerburnV | Error: pastebin.com/B8L3VfA5 | 04:35 | |
sdl2.pm6: github.com/Freezerburn/SDL2-p6/blo...r/sdl2.pm6 | 04:36 | ||
I have all the code on Github, so you can see all of it | |||
Except the OpenGL module. Need to make that repo... | |||
ZoffixWin: Ok now it's all on github :) | 04:40 | ||
ZoffixWin | FreezerburnV, have you tried commenting out this line? github.com/Freezerburn/SDL2-p6/blo...dl2.pm6#L6 | 04:43 | |
Damn. You wrote all that stuff since I pointed out the snake demo? | |||
FreezerburnV | Still doesn't seem to like it :( | 04:44 | |
And no | |||
I wrote all of thise in December | |||
Most of it, at least | |||
ZoffixWin | Ah *phew*... I was about to feel unproductive :) | ||
FreezerburnV | Haha | ||
I've been mostly busy today. Work + Bible study = not much time for Perl today | |||
I'm just trying to get it to compile again | |||
It was working earlier! I swear | 04:45 | ||
There was a blue screen being redrawn and everything | |||
ZoffixWin | Bible study? God hates everyone. The end. What's there to study? :) | 04:46 | |
04:46
Herby_ joined
|
|||
Herby_ | Good evening, everyone! | 04:46 | |
yoleaux | 21 Jan 2016 06:16Z <MadcapJake> Herby_: I think it's just sudo apt-get install libgumbo1 | ||
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. | ||
FreezerburnV | That's a rather simplistic view that seems to ignore the entirety of the New Testament :) | ||
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 | |||
ZoffixWin | Or all of the 1000s of other holy books :P | 04:47 | |
Herby_ | Still having issues with the Gumbo module | 04:48 | |
ZoffixWin | :( | ||
Herby_ | I installed the Gumbo Parser library | ||
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 :) | ||
Herby_ | getting the error "Cannot locate native library 'libgumbo.so.1'" | 04:49 | |
not sure where to go from here | |||
ZoffixWin | Herby_, what OS? | 04:50 | |
Herby_ | ubuntu 14.04 | ||
AlexDaniel | libgumbo-dev ? | ||
Herby_ | trying to use the Perl 6 module Gumbo | ||
AlexDaniel | ah no | ||
you should not really need the dev package… | |||
ZoffixWin | Hm. I don't have "gumbo" anything on my Bodhi | 04:51 | |
AlexDaniel | libgumbo1 package should actually do it… | ||
ZoffixWin | FreezerburnV, is that an invitation to PM right now? :) | ||
Herby_ | github.com/Skarsnik/perl6-gumbo | ||
FreezerburnV | ZoffixWin: Feel free! I just don't want to turn a programming channel into a large argument about religion for everyone's ake | ||
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 | ||
AlexDaniel | ah no, libgumbo1 package is only in debian testing and unstable. | ||
Herby_: yeah right. :( | |||
ZoffixWin | There's no gumbo anything on my Bodhi, which is a fork of Ubuntu 14.04 | ||
Herby_, have you installed ANY libs? | |||
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 | ||
Herby_ | github.com/google/gumbo-parser | ||
just trying to play around with a little html parsing as a perl6 exercise | 04:54 | ||
Gumbo looked to be my best (if only) option | |||
but I'm open to other ideas | |||
AlexDaniel | ZoffixWin: what's your problem? It's a good book! :) www.youtube.com/watch?v=oC-fsFT7ZKs | ||
MadcapJake | Herby what ubuntu are you on? | 04:56 | |
Herby_ | ubuntu 14.04 | ||
MadcapJake | ahh libgumbo is only on 15.10 i think | ||
Herby_ | well thats a stinker | ||
MadcapJake | have you tried installing manually | ||
Herby_ | no clue how to do that | ||
but i'm game if there are instructions somewhere | |||
MadcapJake | git clone github.com/google/gumbo-parser.git | 04:57 | |
cd gumbo-parser | |||
rest of instructions right on git repo: github.com/google/gumbo-parser#installation | |||
Herby_ | yep, I've installed that | ||
appeared to install succesfully | |||
MadcapJake | you did sudo make install | 04:58 | |
Herby_ | yeppers | ||
followed the instructions to the letter | |||
well, through sudo make install | 04:59 | ||
MadcapJake | ok try `sudo updatedb && locate libgumbo.so.1` | ||
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:00 | |
Herby_ | MadcapJake, it found it in /home/herby/gumbo-parser/.libs/libgumbo.so.1 | 05:01 | |
and /usr/local/lib/libgumbo.so.1 | |||
05:01
quester joined
|
|||
Herby_ | Zoffix, I'll definitely try! | 05:01 | |
MadcapJake | ok use the /usr/local one | ||
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! | ||
MadcapJake | wait, i'm not really sure how you're to use this, let me look at the perl6 module | ||
Herby_ | ok thanks. I'm trying to run the second example in the module docs. The one talking about "fancy" | 05:03 | |
05:03
jack_rabbit joined
|
|||
MadcapJake | ok Herby_ i'll give it a go, i'm building from source too, just to make sure it works the same | 05:04 | |
Herby_ | sweet, thanks. Let me know if your "panda install Gumbo" works with successful testing | 05:05 | |
if you're doing that step | |||
MadcapJake | yep, it's installing right now | 05:06 | |
05:06
cpage_ joined
|
|||
MadcapJake | can't locate library here too | 05:07 | |
Herby_ | k | ||
05:07
maslan left
|
|||
Herby_ | any luck? | 05:12 | |
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:13 | |
05:15
yeahnoob left
|
|||
Herby_ | Well thanks for taking time to investigate it | 05:16 | |
any other modules you'd recommend for simple html parsing? | |||
in perl 6 | |||
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 | |
%PATH% on Windows, etc. | |||
05:19
balazs left
|
|||
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:20 | |
MadcapJake | you know what | 05:21 | |
i think this is the same thing that Linenoise went through. | 05:22 | ||
05:23
lustlife` joined
|
|||
Herby_ | he ever find a solution? | 05:24 | |
05:25
AlexDaniel left
|
|||
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:26 | |
05:26
lustlife left
|
|||
MadcapJake | Herby_: he did but it involves building the linenoise.so via a Build.pm and the c/h linenoise files | 05:27 | |
05:27
BenGoldberg left
|
|||
Herby_ | hm | 05:27 | |
hmmmmmm | |||
let me try your tech tip | |||
05:27
Gentoolman joined
|
|||
MadcapJake | i'll try to, in case i have the syntax off, i can help ya | 05:28 | |
s/to/too/ | |||
Gentoolman | How to connect it to apache web server | ||
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 | ||
although it does seem like some of what I said at the time got into it since we have api versions now | 05:29 | ||
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:30 | |
i've started a few wrappers but right now i just have LIB just return an absolute path to my library | 05:31 | ||
s/just// xD | 05:32 | ||
Herby_ | u oh | 05:33 | |
MadcapJake | tests pass for me Herby_ | ||
Herby_ | ha hah! | 05:34 | |
you're the man :) | |||
success! | |||
and now the module example script works no problem | 05:35 | ||
Thanks, MadcapJake | 05:36 | ||
Now I just have to figure out how to use the module, beyond the example | |||
05:36
yeahnoob joined
|
|||
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 | ||
Herby_ | great, thanks | 05:38 | |
MadcapJake | no prob! Glad I could help! | ||
05:40
xpen left
05:41
xpen joined
05:43
Cabanossi left
05:45
trustfundbby96 joined
05:47
Cabanossi joined
05:48
skids left
05:51
xpen left
05:54
ELBeavers joined
05:56
lustlife` left
05:59
ELBeavers left
06:02
Amnez777- joined,
Herby_ left
06:03
rickbike joined,
laz78 left
06:04
ChoHag_ is now known as ChoHag
06:05
jme` left
06:06
Amnez777 left
06:09
pierre-vigier joined
06:12
n0tjack joined
06:13
FreezerburnV left
06:16
n0tjack left
06:20
Gentoolman left,
xpen joined
06:23
pierre-vigier left
06:26
pierre-vigier joined
|
|||
rickbike | Hello perl6ers | 06:43 | |
06:47
domidumont joined
|
|||
rickbike | Trying to use a number as a hash key | 06:47 | |
sub MAIN (*%h) { %h.keys.say; }; | |||
then test.pl --foo=bar --42=bat | |||
returns (foo -42) | 06:48 | ||
why -42? | |||
06:50
mr-foobar left
06:52
domidumont left
06:53
mr-foobar joined,
domidumont joined
|
|||
gfldex | rickbike: please file a bug report. It's either a bug in the options parser or a bug in the docs. | 07:00 | |
rickbike | OK | 07:01 | |
07:02
quester left
|
|||
rickbike | any suggestion on a catchy subject/title of bug report? | 07:02 | |
gfldex | "fail to handle numbers as option name for MAIN" | 07:03 | |
07:04
CIAvash joined,
khw left
|
|||
rickbike | thanks gfldex | 07:04 | |
ugexe | you cant have variable names that start with numbers | 07:09 | |
:42(bat) would fail just the same | |||
gfldex | he didn't ask for that | ||
ugexe | how would you access named variable 42 then? | 07:10 | |
gfldex | either %h<--42> or %h<42> | ||
07:12
geraud left
07:13
mr-foobar left
07:16
mr-foobar joined
|
|||
dalek | osystem: f54022b | azawawi++ | META.list: ImageMagick's MagickWand API bindings are here :) See github.com/azawawi/perl6-magickwand |
07:18 | |
07:22
RabidGravy joined,
Zero_Dogg left,
Zero_Dogg joined
07:24
_mg_ joined
07:26
vendethiel joined
07:28
nakiro joined
07:30
vendethiel left
|
|||
sortiz | Someone remember where is ::?CLASS documented? | 07:30 | |
07:30
mr-foobar left
|
|||
llfourn | sortiz: in design documents? | 07:31 | |
07:32
mr-foobar joined
|
|||
llfourn | sortiz: design.perl6.org/S14.html | 07:32 | |
07:32
domidumont1 joined
|
|||
sortiz | llfourn, thanks! | 07:33 | |
07:34
pierre-vigier left
07:35
domidumont left
07:36
trustfundbby96 left,
mr-foobar left
07:38
sjoshi joined
07:40
mr-foobar joined
07:43
firstdayonthejob joined
07:45
FROGGS joined
|
|||
[Tux] | csv-ip5xs 17.704 | 07:46 | |
test 22.555 | |||
test-t 12.409 | |||
csv-parser 49.714 | |||
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:47 | |
i.e. | 07:48 | ||
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» | ||
FROGGS | RabidGravy: the problem is the invocant | 07:53 | |
m: class Foo { our token valid-db-name (Mu:) { ^<[a .. z]><[a .. z0 .. 9_$()+/-]>*$ } }; say so "ab1-foo" ~~ /<Foo::valid-db-name>/; | |||
camelia | rakudo-moar 775271: OUTPUT«Method '!cursor_init' not found for invocant of class 'Foo' in block <unit> at /tmp/IPsUYRxh1Q line 1» | ||
FROGGS | errr | ||
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» | ||
dalek | c: 21754ba | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod: name ::?CLASS |
||
FROGGS | m: class Foo { our token valid-db-name { ^<[a .. z]><[a .. z0 .. 9_$()+/-]>*$ } }; say so "ab1-foo" ~~ /<&Foo::valid-db-name>/; | ||
camelia | rakudo-moar 775271: OUTPUT«True» | ||
FROGGS | so, it is not just about the invocant :o) | ||
RabidGravy | that clears something up though | 07:55 | |
just seemed overkill to define a grammar for basically a single token | 07:56 | ||
you may have realised that I try to avoid using regular expressions if at all possible :) | 07:57 | ||
08:04
trustfundbby96 joined
|
|||
FROGGS | hmmmm, I like regexes... | 08:04 | |
masak | morning, #perl6 | 08:06 | |
moritz | \o masak, * | ||
FROGGS | morning m&m | 08:07 | |
moritz feels like an endangered food right now | |||
FROGGS is too tired to be hungry | 08:08 | ||
masak is too tired to be tired | 08:09 | ||
FROGGS is soo tired he cannot even say "tired" | 08:10 | ||
masak | .u tired | ||
yoleaux | U+1F62B TIRED FACE [So] (😫) | ||
masak | 😫 | ||
08:12
darutoko joined
08:16
pierre-vigier joined
|
|||
llfourn | that looks more like SOMEONE BROKE LEGOS face than tired | 08:16 | |
08:23
firstdayonthejob left
|
|||
TEttinger | .u cat | 08:28 | |
yoleaux | U+0ECB LAO TONE MAI CATAWA [Mn] (◌໋) | ||
U+A2B6 YI SYLLABLE CAT [Lo] (ꊶ) | |||
U+101EC PHAISTOS DISC SIGN CAT [So] (𐇬) | |||
TEttinger | no cat face laughing? | ||
08:29
cc9989 joined,
rickbike left
08:30
abaugher left,
leont joined
08:31
abaugher joined
08:32
zakharyas joined
|
|||
cognominal | .u butterfly | 08:34 | |
yoleaux | No characters found | ||
cognominal | .u bug | ||
yoleaux | U+1A00 BUGINESE LETTER KA [Lo] (ᨀ) | ||
U+1A01 BUGINESE LETTER GA [Lo] (ᨁ) | |||
U+1A02 BUGINESE LETTER NGA [Lo] (ᨂ) | |||
cognominal | .u ant | 08:35 | |
yoleaux | U+1CE9 VEDIC SIGN ANUSVARA ANTARGOMUKHA [Lo] (ᳩ) | ||
U+20D4 COMBINING ANTICLOCKWISE ARROW ABOVE [Mn] (◌⃔) | |||
U+20DA COMBINING ANTICLOCKWISE RING OVERLAY [Mn] (◌⃚) | |||
08:37
darutoko left,
ely-se joined,
darutoko joined,
trustfundbby96 left
08:39
araujo_ joined
|
|||
ely-se | Hello, world! | 08:40 | |
jdv79 | good morning | ||
08:40
araujo left
08:41
abraxxa joined,
araujo_ left,
araujo_ joined
08:43
araujo_ left,
araujo_ joined
08:44
mr-foobar left,
leont left
08:45
mr-foobar joined
08:48
rindolf joined
|
|||
RabidGravy | gosh, I started writing this module in April, better get finishing it then | 08:55 | |
08:55
mr-foobar left
08:56
sno joined
08:58
mr-foobar joined
09:00
rindolf left
|
|||
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..2ok 1 - Handlingnope in sub falla at /tmp/DQ2VSG5Sls line 1 in block <unit> at /tmp/DQ2VSG5Sls line 1Actually thrown at: in any at gen/moar/m-Metamodel.nqp line 3041 in block <unit> at /tmp/DQ2VSG5Sls line 1# Looks lik…» | ||
RabidGravy | sorry not quite sure what the point is | 09:04 | |
it will throw the failure when you assign it to the variable | |||
sortiz | Its documented that testing for .defined in a failure, make its "handled". | 09:05 | |
RabidGravy | sure | 09:06 | |
sortiz | So $f.hanldled should returns True, not throw it | 09:07 | |
RabidGravy | m: sub f() { fail "boom" }; say "before"; my $f = f(); say "after"; | 09:08 | |
camelia | rakudo-moar 775271: OUTPUT«beforeafter» | ||
RabidGravy | okay | ||
ely-se | need a tool that warns on unused variables | 09:09 | |
this is too error-prone | |||
09:09
CIAvash left,
rindolf joined
|
|||
sortiz | A failure must throw when sinked or used as an invocant if not handled. | 09:09 | |
m: sub f() { fail "boom" }; say "before"; f(); say "after"; | 09:10 | ||
camelia | rakudo-moar 775271: OUTPUT«beforeboom in sub f at /tmp/Yo9UGSpWvj line 1 in block <unit> at /tmp/Yo9UGSpWvj line 1Actually thrown at: in block <unit> at /tmp/Yo9UGSpWvj line 1» | ||
09:10
leont joined,
domidumont1 left
09:20
maxb_ joined
09:21
maxb_ is now known as Guest30572
|
|||
Guest30572 | quick question regarding slurpy behaviour - I have this sub definition: | 09:21 | |
sub slurpyPerl5 (*@_) { @_.join('/').say } | 09:22 | ||
09:22
virtualsue joined
|
|||
Guest30572 | ...which I call like that: | 09:22 | |
slurpyPerl5([1 , [1.1,1.2],2,3] , 10 , 20) | |||
and I get this: 1/1.1 1.2/2/3/10/20 | |||
09:23
yeahnoob left
|
|||
Guest30572 | I always figured the flattening happens hierarchical so i should be: 1/1.1/1.2/2/3/10/20 | 09:23 | |
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 | ||
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 | ||
sortiz | doc.perl6.org/type/Failure#method_handled | ||
leont | Guest30572: try (**@) | 09:26 | |
(**@_) | |||
masak | um | ||
I'm not sure that's implemented | |||
leont | Ow | ||
masak | and I suspect even that one respects the Array boundary in one of the arguments | ||
09:27
mr-foobar left
|
|||
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 | ||
camelia | rakudo-moar 775271: OUTPUT«(1 2 (3 4) 5)» | ||
masak | say [1, 2, [3, 4], 5].flat | ||
m: say [1, 2, [3, 4], 5].flat | |||
camelia | rakudo-moar 775271: OUTPUT«(1 2 [3 4] 5)» | ||
masak | m: say (1, 2, (3, 4), 5).flat | 09:28 | |
camelia | rakudo-moar 775271: OUTPUT«(1 2 3 4 5)» | ||
masak | m: say (1, 2, [3, 4], 5).flat | ||
camelia | rakudo-moar 775271: OUTPUT«(1 2 3 4 5)» | ||
masak | m: say (1, 2, [3, 4, [5, 6]], 7).flat | ||
camelia | rakudo-moar 775271: OUTPUT«(1 2 3 4 [5 6] 7)» | ||
jdv79 | is there a new chan or are a lot of people just taking a break lately? | ||
masak | jdv79: do we talk too little? :P | ||
moritz | jdv79: there's #perl6-toolchain and #perl6-release | ||
masak | what's #perl6-release for? | 09:29 | |
09:29
pierre-vigier left,
pierre-vigier joined
|
|||
jdv79 | moritz: thanks | 09:29 | |
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_ left,
araujo joined,
araujo left,
araujo joined,
ELBeavers joined
|
|||
ely-se | say [1, 2, |[3, 4], 5].flat | 09:30 | |
m: say [1, 2, |[3, 4], 5].flat | 09:31 | ||
camelia | rakudo-moar 775271: OUTPUT«(1 2 3 4 5)» | ||
Guest30572 | quit | 09:32 | |
09:32
Guest30572 left
|
|||
sortiz | Array.flat don't flat common Arrays, see: github.com/rakudo/rakudo/blob/nom/...ay.pm#L366 | 09:33 | |
09:33
pierre-vigier left
|
|||
RabidGravy | I'm not quite sure why you'd want to flatten to an arbitrary depth | 09:33 | |
09:34
pierre-vigier joined,
lnrdo joined
09:35
ELBeavers left
09:38
n0tjack joined
09:41
mr-foobar joined
09:43
n0tjack left
09:44
brrt joined
|
|||
sortiz | RabidGravy, for arbitrary depth, I want an adverb :deep in flat :) | 09:44 | |
masak | a named parameter | 09:46 | |
sortiz | Yes | 09:47 | |
With default 1 | |||
masak | I'm pretty sure deep flattening by default must have been discussed during the GLR, and rejected | 09:48 | |
09:49
cpage_ left
|
|||
ely-se | deep flattening by default is a horrible idea | 09:50 | |
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 | |||
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. | ||
my current stance is that I tend to stay away from most kinds of flattening in my code. | |||
at most, I lean on the one-argument rule | |||
the 007 has two explicit `flat` calls, both of them in .t files | 09:52 | ||
s/007/007 codebase/ | |||
sortiz | The real problem is that the people expect that "flat" flatten. | 09:54 | |
09:56
mr-foobar left,
mr-foobar joined
|
|||
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 | |
09:57
domidumont joined
|
|||
jast | personally I don't expect deep flattening | 09:58 | |
brrt | i thought we had the slip thingy for that | ||
sortiz | On the other side Iterator.flat just DWIM | ||
09:59
mr-foobar left,
mr-fooba_ joined
|
|||
ely-se | the problem with DWIM is that it doesn't know what you mean | 09:59 | |
09:59
Amnez777- left,
Amnez777- joined
|
|||
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 | ||
s/points/pointy/ | 10:02 | ||
sortiz | BTW, I don't expect deep flattening, neither | ||
gfldex | i would expect deep flattening if i ask for it and prefer slippy versions of metas | 10:03 | |
10:03
espadrine_ joined
|
|||
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» | ||
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» | ||
sortiz | Yes, right. I seen your comments about it yesterday. | ||
gfldex | m: dd ((1,2,3) Z <a b c d>).join | 10:05 | |
camelia | rakudo-moar 775271: OUTPUT«"1 a2 b3 c"» | ||
gfldex | and it's hard to chain with methods aswell | ||
10:05
pfortuny joined
|
|||
pfortuny | uffff. I am running a multithreaded code and having issues with opening files for writing... | 10:05 | |
Failed to open file [...]: no such file or directory | 10:06 | ||
ely-se | Sounds like a race condition. | ||
pfortuny | BUT it is open "$filename", :w | ||
and the filename is unique | |||
avalenn_ | is there any emacs mode for perl6 ? | 10:07 | |
10:07
brrt left
|
|||
pfortuny | but what I do not understand is why "no such file" | 10:07 | |
10:07
leont left
|
|||
pfortuny | avalenn_: yep, in one of the packages | 10:07 | |
10:07
eyck left
|
|||
pfortuny | avalenn_: github.com/hinrik/perl6-mode | 10:08 | |
10:08
avalenn_ is now known as avalenn
|
|||
avalenn | pfortuny: thank you | 10:09 | |
pfortuny | avalenn: not at all. | ||
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 | |
10:11
jaffa4 joined
|
|||
jaffa4 | hi all | 10:11 | |
I have a code the worked previously | |||
Type check failed in binding @rec; expected 'Positional' but got 'Hash' the codei is : for @.tokens -> @rec ..... | 10:12 | ||
10:15
pierre-vigier left
|
|||
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. | ||
jaffa4 | yes | ||
ely-se | m: my %h := { a => 1 }; | 10:19 | |
camelia | ( no output ) | ||
RabidGravy | not sure how it would have worked before but changing that to %rec should do | ||
ely-se | m: my @h := { a => 1 }; | ||
camelia | rakudo-moar 775271: OUTPUT«Type check failed in binding; expected Positional but got Hash in block <unit> at /tmp/KgRxg8oNOc line 1» | ||
10:19
virtualsue left
|
|||
sortiz | Or use a simple $ (Scalar), that works too. | 10:20 | |
10:23
cpage_ joined
|
|||
sortiz | Unless you need the "special" semantic of @ or %, a simple scalar is good container of any type. | 10:24 | |
10:25
Averna left
10:26
zakharyas left
|
|||
pfortuny | ely-se: surprising (?) if I protect the open() with a lock, the issue seems to go away | 10:26 | |
fascinating because the names are unique always | |||
is there any explanation for this? | |||
RabidGravy | without seeing the code no | ||
pfortuny | yep, but the code is a mess... | 10:27 | |
I've tried to simplify it but the issue goes away | |||
10:27
zakharyas joined
|
|||
RabidGravy | are you doing this in a .tap (or whenever block) on a supply? | 10:28 | |
pfortuny | in a tap | ||
RabidGravy | if .tap then change it to .act | ||
pfortuny | oh! | ||
nope. | 10:29 | ||
RabidGravy | ..tap will run them as fast as they come in .act will only run one at a time | ||
pfortuny | it also fails | ||
konobi | ooohhh... fun with backpressure | ||
pfortuny | which means? | ||
RabidGravy | thus demonstrating how hard it is to speculate on code that you haven't seen | ||
pfortuny | :D | 10:30 | |
:DDDDD | |||
10:30
TEttinger left
|
|||
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 | ||
pfortuny | no, it is a mess because of all the things I need to do | ||
inside the tap | |||
(and because the async process I am running IS a mess: maxima) | 10:31 | ||
but I am tied up to it | |||
RabidGravy | consider using a whenever instead | ||
pfortuny | what would that do? (sorry novice here) | 10:32 | |
konobi | pfortuny: reading faster than you can deal with stuff coming in | ||
RabidGravy | potentially distributing work via other supplies | ||
pfortuny | ?? | ||
RabidGravy | react { whenever $supply { } } | ||
pfortuny | ah, I see. I'll try that. | ||
konobi: mind explaining a bit? | |||
RabidGravy | in certain applications it might make the code neater at least | 10:33 | |
pfortuny | thanks a lot, RabidGravy ! | ||
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. | ||
each process has a file and I save the output there | |||
but for whatever reason, sometimes, after some iterations, the open($fname, :w) fails | 10:35 | ||
with a "No such file or directory" (mind this message!) | |||
konobi | ah, sorry... yeah, i was just recalling an issue that was had with this async behaviour before | ||
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? | ||
pfortuny | however, if I Lock.protect the open(), everything works. | ||
RabidGravy | there's a throttle | ||
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 | ||
RabidGravy | sure | ||
pfortuny | RabidGravy: the $fname is local to the tap, the resulting handle is necessarily (for me) defined outside | 10:38 | |
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. | ||
RabidGravy | you almost certainly *do* need the lock then | ||
pfortuny | even if I am sure that the race will not happen? | 10:40 | |
sure as in "impossible" | |||
(not "just pretty sure") | |||
(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 | ||
you'd end up blowing your stack without backpressure | |||
10:42
domidumont left
|
|||
RabidGravy | anyway must awah to the supermarket | 10:42 | |
pfortuny | thanks konobi & RabidGravy | 10:43 | |
10:43
domidumont joined
10:47
RabidGravy left,
Shozan is now known as SHODAN,
CurtisOvidPoe joined
|
|||
CurtisOvidPoe | Is there a module to pretty print data structures? | 10:48 | |
DrForr | github.com/drforr/perl6-pp is a start. | ||
Juerd | Open for discussion and testing: github.com/rakudo/rakudo/pull/688 | ||
stmuk_ | Data::Dump too | ||
and probably one or two others | 10:49 | ||
doc.perl6.org/language/faq#How_can_...ilar%29%3F | 10:50 | ||
CurtisOvidPoe | *resolve stage failed for Pretty::Printer: Project Pretty::Printer not found in the ecosystem) | ||
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. | ||
DrForr looks. | |||
yep, broken. | |||
Fixed, pushed. Need to add .travis.yml as well. | 10:54 | ||
jaffa4 | this does not work push @tokens, [$(%starts_ends{$prevpos}),$prevpos, $_]; | 10:55 | |
r: print "hello" | 10:56 | ||
camelia | rakudo-jvm 6c0f93, rakudo-moar 775271: OUTPUT«hello» | ||
10:56
brrt joined
|
|||
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/tmpfileMalformed postfix callat /tmp/tmpfile:1------> 3my @d; push @d,[1,2,3]; push @d,[4.5.7⏏056]; say @d.perl;» | ||
..rakudo-jvm 6c0f93: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileUnsupported 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;» | |||
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]]» | ||
jaffa4 | bug in the compiler | 10:58 | |
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]» | ||
gfldex | jaffa4: nope | ||
jaffa4 | I mean in version This is perl6 version 2015.09 built on MoarVM version 2015.09 | ||
gfldex | m: my @d; append @d,[1,2,3]; append @d,[4,5,6]; say @d.perl; | ||
camelia | rakudo-moar 775271: OUTPUT«[1, 2, 3, 4, 5, 6]» | ||
gfldex | or you use the right method | 11:00 | |
DrForr | jaffa4: That's from what, October of last year? Maybe update if you can. | ||
gfldex | back then it was by design | ||
jaffa4 | there is no windows version | ||
installer | 11:01 | ||
DrForr | Like I said, if you can. | 11:02 | |
stmuk_ | in hindsight pre 6.c releases probably should have exited after Dec 25th :) | 11:03 | |
git-man-page-generator.lokaltog.net/ | 11:06 | ||
11:12
perlawhirl joined,
maslan joined
|
|||
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
11:18
brrt left
|
|||
perlawhirl | hi perlers | 11:19 | |
11:19
ELBeavers joined
|
|||
perlawhirl | can i multi method with a role ?? What's the signature | 11:19 | |
m: role T { multi method t (Str) { "STRING" } }; my $i = 'foo' but T; say $i.t; | |||
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» | ||
gfldex | m: role T { multi method t (Any:D \s:) { "STRING" } }; my $i = 'foo' but T; say $i.t; | 11:23 | |
camelia | rakudo-moar 775271: OUTPUT«STRING» | ||
CurtisOvidPoe | Any critique of my Perl 6 style is welcome: gist.github.com/Ovid/43c131642b82f202d977 | ||
gfldex | perlawhirl: ^^^ | ||
11:23
ELBeavers left
|
|||
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» | ||
gfldex | likely better | ||
perlawhirl | gfldex: thanks! playing around now | 11:28 | |
what does the \s: mean? | 11:29 | ||
gfldex | \s means binding and the : means "left of me is the invocant" | ||
11:31
azawawi joined
|
|||
azawawi | hi | 11:31 | |
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]]» | ||
CurtisOvidPoe | How do I stop @c from slurping up both arrays? | ||
azawawi | github.com/azawawi/perl6-magickwan...-hello.pl6 # ImageMagick in Perl 6 :) | ||
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:34 | |
11:36
pfortuny left
11:37
cc9989 left
|
|||
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]» | ||
gfldex | CurtisOvidPoe: i believe what you want is NYI | ||
jnthn | m: role T { multi method t() { "STRING" } }; my $i = 'foo' but T; say $i.t | 11:39 | |
camelia | rakudo-moar 775271: OUTPUT«STRING» | ||
jnthn | Why the sig at all? | ||
gfldex | p6: sub foo {my @a = 1,2; my @b = 3,4; return $@a, $@b}; my ($c, $d) = foo(); dd $c, $d; | ||
camelia | rakudo-moar 775271: OUTPUT«Array $c = $[1, 2]Array $d = $[3, 4]» | ||
CurtisOvidPoe | Ah, thanks. That seems strange, but OK :) | ||
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 | |
m: sub foo {my @a = 1,2; my @b = 3,4; return @a, @b}; my (@c, @d) := foo(); say @c.perl; say @d.perl | |||
camelia | rakudo-moar 775271: OUTPUT«[1, 2][3, 4]» | ||
jnthn | CurtisOvidPoe: Use binding to get "what a signature would do" | ||
11:40
_mg_ left
|
|||
CurtisOvidPoe | jnthn: thank you :) | 11:41 | |
gfldex | CurtisOvidPoe: in your example you could do: | 11:42 | |
m: sub n(){Nil}; while my $line = n() // False { say 'never ever!' } | |||
camelia | ( no output ) | ||
DrForr | Oh, Olson, how do I hate thee. Let me count the ways: 0,1,1:15,2,3:30... | ||
gfldex | CurtisOvidPoe: why do you need the .defined? Can linenoise return something that is undefined but True? | 11:45 | |
11:46
CurtisOvidPoe left,
CurtisOvidPoe joined
|
|||
CurtisOvidPoe | gfldex: I just used the code from the Linenoise synopsis. | 11:46 | |
11:47
cc9989 joined
|
|||
sortiz | jnthn, It's supposed that Failure.handled to be visible? According to doc.perl6.org/type/Failure#method_handled, yes but not in the current implementation. | 11:49 | |
gfldex | CurtisOvidPoe: it will return Str (what is undef and False), see: github.com/hoelzro/p6-linenoise/bl....pm.in#L84 | 11:50 | |
CurtisOvidPoe | gfldex: thanks. | ||
perlawhirl | gfldex: why doesn't it work with arrays... | 11:51 | |
m: role T { multi method t (Any:D \s:) { "ARRAY" } }; my @i = ('foo') but T; say @i.t; | |||
camelia | rakudo-moar 775271: OUTPUT«Method 't' not found for invocant of class 'Array' in block <unit> at /tmp/lHvjqNjdYF line 1» | ||
perlawhirl | m: role T { multi method t (Array:D \s:) { "ARRAY" } }; my @i = ('foo') but T; say @i.t; | ||
camelia | rakudo-moar 775271: OUTPUT«Method 't' not found for invocant of class 'Array' in block <unit> at /tmp/RlWm9moWsq line 1» | ||
gfldex | you try to bind it to the wrong kind of container | 11:52 | |
@a <-- not Array but a container of type Array | |||
m: role T { multi method t (Array:D $s:) { "ARRAY" } }; my @i = ('foo') but T; say @i.t | |||
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
|
|||
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» | ||
gfldex | m: role T { multi method t () { "ARRAY" } }; my @a := Array.new('foo') but T; say @a.t | ||
camelia | rakudo-moar 775271: OUTPUT«ARRAY» | ||
11:56
ely-se left
|
|||
gfldex | perlawhirl: i would be careful with mixin into array containers. To me that does not make sense. | 11:56 | |
or better it's unclear if you want to mixin into the Array or the values inside the array | |||
11:57
pfortuny joined
|
|||
perlawhirl | gfldex: thanks. i'm not sure i would ever use it. just poking around in the some corners of the language | 11:59 | |
12:01
xpen left
|
|||
CurtisOvidPoe | Using 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:01 | |
12:03
ely-se joined
12:05
espadrine_ is now known as espadrine
12:11
cognominal left
|
|||
moritz | CurtisOvidPoe: vaguely familiar, but I don't know what's wrong | 12:12 | |
nor how to fix it :( | |||
12:13
cognominal joined
|
|||
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 :) | ||
jaffa4 | could anyone tell me what is the solution? | ||
ely-se | jaffa4: "build panda", not "build-panda" | 12:16 | |
jaffa4 | it makes no difference | 12:17 | |
12:17
kid51 joined
|
|||
azawawi | jaffa4: why are you doing a './rakudobrew' not 'rakudobrew' ? | 12:18 | |
moritz | jaffa4: what verison of rakudo did you build? | ||
jaffa4 | I d not know | ||
WHat should I? | |||
moritz | jaffa4: what did you type to build a rakudo, and when did you do it? | 12:19 | |
12:19
kaare_ joined
|
|||
jaffa4 | I get the same message | 12:20 | |
if I try to build rakudo | |||
I have a version of rakudo which I installed outside of rakudobrew | |||
12:21
perlawhirl left
|
|||
moritz | jaffa4: what do you type to build rakudo? | 12:21 | |
12:21
Skarsnik joined
12:23
FROGGS left
|
|||
jaffa4 | ok, it works for now | 12:23 | |
moritz | jaffa4: what did you do to make it work? | 12:24 | |
jaffa4 | not sure yet.. I am building rakudo through rakudobrew | 12:25 | |
that works | |||
moritz | you said earlier you get the same message when you build rakudo | 12:27 | |
oh, never mind | |||
12:28
kid51 left,
maslan left
|
|||
azawawi | moritz: github.com/azawawi/perl6-magickwan...-hello.pl6 # more fun with Perl 6 :) | 12:28 | |
moritz | azawawi: :-) | 12:29 | |
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 :) | ||
Skarsnik | And hello | 12:31 | |
azawawi | and hi :) | ||
gptrixie does not work on imagewand api btw :) | |||
Skarsnik | hm | ||
how it fail? | 12:32 | ||
12:32
brrt joined
|
|||
azawawi | unbox exception when i tried on /usr/include/ImageMagick/wand/magick-image.h | 12:33 | |
Skarsnik | wow | ||
that a weird error to have | |||
12:34
brrt left
|
|||
azawawi | i think it has to do with the extern MagickBoolType func1, funct2, ...; block | 12:36 | |
12:37
pfortuny left
|
|||
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:37 | |
12:41
lnrdo left
|
|||
Skarsnik | constant are compiled? | 12:41 | |
It keep me the value of a constant as it was at precomp time | 12:43 | ||
moritz | of course | 12:44 | |
they are constant after all :-) | |||
12:45
virtualsue left
|
|||
Skarsnik | err | 12:45 | |
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 | ||
1..5 | |||
Cannot locate native library '/usr/local/lib/liblibgumb.so': | |||
DrForr | "Constants aren't, variables won't, functions don't." | ||
Skarsnik | That a bit bad when the constant is like that: constat LIB = %*ENV<> || ('gumbo', v1) | 12:47 | |
DBIish has that btw | |||
It should not be compiled when it depend on a variable x) | |||
jnthn | constant is defined as "evaluated at BEGIN time" | ||
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 | ||
jnthn | BEGIN time *is* compile time | ||
That's the difference between BEGIN and INIT | 12:49 | ||
Skarsnik | I am pretty sure lot of people will fail for it | ||
it should have a name more like static | 12:50 | ||
ely-se | lol | 12:51 | |
jnthn | "I didn't bother to learn this language properly. Why doesn't it read my mind?" | ||
ely-se | because the motto is DWIM | ||
jnthn | Well, it does exactly what *I* mean :D | ||
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:52 | |
Skarsnik | constant is not in the doc | 12:53 | |
gfldex | Skarsnik: it is. It's just well hidden: doc.perl6.org/language/5to6-nutshell#constant | 12:54 | |
CurtisOvidPoe | Or is that not the way to print documentation for the code? | ||
Skarsnik | jnthn, I think it will be confusing for people since script are not precompiled, only modules are | ||
12:55
domidumont left
|
|||
jnthn | Skarsnik: At the moment, at least :) | 12:55 | |
Skarsnik | and I need to patch DBIish x) | ||
It's a wonder we did nave complain about that | |||
but it's not really documented so.. | 12:56 | ||
jnthn | Yeah, needs documenting to mention it's BEGIN time | ||
lunch & | |||
Skarsnik | hm, I can't export a sigilless var? | 12:57 | |
moritz | you can't export and import vars | 12:58 | |
not in a way that does what you mean | |||
Skarsnik | well it work for constant x) | ||
moritz | but those are, well, constant | 12:59 | |
which is not *quite* the same as a variable | |||
gfldex | i didn't try but i believe you could export a Proxy, what will looks surprisingly like a variable | 13:00 | |
timotimo | o/ | 13:01 | |
13:01
xpen joined
|
|||
Skarsnik | azawawi, hm, how did you run gptrixie on the header, it does not get pass gccxml for me | 13:02 | |
weird error btw x) | 13:04 | ||
Term definition requires an initializer | |||
at /home/skarsnik/devel/perl6-gumbo/lib/Gumbo/Binding.pm6:16 | |||
------> my \GUMBO_LIB⏏ is export = %*ENV<PERL6_GUMBO_LIB> || ( | |||
azawawi | GCC-XML version 0.9.0 | 13:05 | |
gcc 4.8.4 | |||
13:06
virtualsue joined
|
|||
Skarsnik | /usr/include/ImageMagick-6/wand/magick-image.h:26: error: 'WandExport' does not name a type | 13:06 | |
dalek | c: 568651e | (Wenzel P. P. Peppmeyer)++ | doc/Language/terms.pod: doc constant |
||
timotimo | Skarsnik: can you even use "is export" on a backslashed var like that? | ||
13:06
xpen left
|
|||
Skarsnik | probably missing an include path | 13:06 | |
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
13:10
lnrdo joined
|
|||
CurtisOvidPoe | How do I view the documentation of an installed module? | 13:10 | |
13:11
maslan joined
|
|||
Skarsnik | perl6doc? | 13:11 | |
13:12
ELBeavers left
|
|||
CurtisOvidPoe | Skarsnik: there is no such command that I see. | 13:12 | |
I thought it was “perl6 —doc …”, but that’s not it either. | |||
gfldex | CurtisOvidPoe: NYI | 13:13 | |
Skarsnik | I am pretty most of modules does not have a doc outside the readme.. so | ||
CurtisOvidPoe | 15 years and we still don’t have perldoc for Perl 6? o_O :) | ||
Skarsnik | azawawi, hm, I can't get it run. I tried on MagickWand.h | 13:16 | |
stmuk_ | CurtisOvidPoe: p6doc should work as of earlier in the week | 13:19 | |
Skarsnik | ok, I really need exclusion in gptrixie: -Functions: 2362 | ||
probably a lot from stdlib and pthread x) | |||
stmuk_ | assuming the module actually has pod in it .. otherwise App::ecoreadme might help | 13:20 | |
since it pulls the GH README often used | |||
13:21
RabidGravy joined
|
|||
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
_Vi left
|
|||
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 | ||
yeah I get the same error its probably because its nativecall not pure perl6 I'll take a look | 13:26 | ||
CurtisOvidPoe | Cheers :) | 13:27 | |
Skarsnik | hm, it's actually annoying that the native trait has his param evaluated at compile time | 13:28 | |
13:29
virtualsue left
13:30
Ven joined
|
|||
RabidGravy | Skarsnik the same applies for all traits | 13:30 | |
Ven | o/, #perl6 | ||
timotimo | well, i can see reasons for properly setting up %*RESOURCES even when "just" extracting docs | ||
RabidGravy | I can't see how it could be much different to be hones | ||
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 | ||
Skarsnik | constant keep it compile time value | ||
so it does not work | |||
stmuk_ | hmmm P6DOC_DEBUG=1 suggests a rakudo rather than p6doc bug :/ | ||
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 | ||
or something like that | 13:33 | ||
ely-se | m: subset Slug of Str where /<[a..z0..9-]>+/; my Slug $s = 'hello-world'; | 13:34 | |
camelia | ( no output ) | ||
CurtisOvidPoe | sortiz: is that a -l? If so, I just get a usage message, not the docs | ||
13:35
jaffa4 left
|
|||
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) | ||
stmuk_ | I added -l sometime this week and it's intended to list modules | 13:36 | |
sortiz | See: github.com/perl6/doc/commit/ac1285...1567781c43 | ||
stmuk_ | the problem is that perl6 --doc as called by p6doc is errring | 13:38 | |
13:39
treaki joined
|
|||
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) | ||
that's ... a little difficulty that has to be addressed | |||
Skarsnik | damn, I can't export a constant that point to a sub? | 13:42 | |
13:42
lnrdo left
|
|||
timotimo | you ... can't? | 13:42 | |
Skarsnik | m: module A { our constant B is export = sub { say foo}}; &B; | ||
camelia | rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xPu2K8e6LjUndeclared routine: foo used at line 1» | ||
Skarsnik | m: module A { our constant B is export = sub { say "foo"}}; &B; | ||
camelia | rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YICELtfcp9Can'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…» | ||
timotimo | oh, huh | 13:43 | |
m: module A { our constant Foo is export = "hi"; }; import A; Foo; | |||
camelia | rakudo-moar 775271: OUTPUT«WARNINGS for /tmp/9kfLz4aJI9:Useless use of constant value Foo in sink context (line 1)» | ||
timotimo | m: module A { our constant Foo is export = "hi"; }; import A; say Foo; | ||
camelia | rakudo-moar 775271: OUTPUT«hi» | ||
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/DvxhTtafIBCan'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…» | ||
MadcapJake | Skarsnik: why do you need to export it, just put that sub right in Binding.pm6 | ||
timotimo | seems like the "is export" lands in the wrong spot | ||
Skarsnik | because I don't want to deal with a sub name x) | ||
[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 | |
*users' | |||
Skarsnik | x) | ||
ZoffixWin | m: module A { my &x = sub { say "foo"}; our constant B is export = &x}; import A; B; | ||
MadcapJake | why not just `constant LIB = sub { %*ENV<PERL6_GUMBO_LIB> || ('gumbo', v1) }` | ||
camelia | rakudo-moar 775271: OUTPUT«WARNINGS for /tmp/UUbFPQw6Kt:Useless use of B symbol in sink context (line 1)» | ||
Skarsnik | I say same as Rakudo, see the LICENCE file x) | ||
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_m33oEy6HTarget type too complex to form a coercion typeat /tmp/J_m33oEy6H:1------> 3onstant B is export = &x}; import A; B()7⏏5;» | ||
azawawi | github.com/azawawi/perl6-magickwan...-hello.pl6 # side-by-side original image + filtered image in Perl 6 :) | ||
Skarsnik | azawawi, give a screen shot! | ||
azawawi | 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
|
|||
ZoffixWin twitches | 13:49 | ||
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 :) | ||
ZoffixWin | azawawi, blogs.perl.org/users/zoffix_znet/20...erl-6.html | 13:51 | |
13:51
pierre-vigier left
|
|||
ZoffixWin | And the comment is on reddit: www.reddit.com/r/perl/comments/425..._6/cz7p5w8 | 13:51 | |
MadcapJake | Skarsnik: what about `do if %*ENV<PERL6_GUMBO_LIB> -> $lib { $lib } else { ('gumbo', v1) }` | ||
13:52
pierre-vigier joined
|
|||
Skarsnik | hm | 13:52 | |
azawawi | ZoffixWin: thx | 13:53 | |
Skarsnik | m: use NativeCall; my \LIB = ('foo', v1); sub foo is native(LIB) {*}; | ||
camelia | rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pffKOypNCUCan'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…» | ||
Skarsnik | that's weird? | ||
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: :) | ||
Skarsnik | ok I am confused | 13:55 | |
[Coke] | Skarsnik: as long as you include a copy of the LICENSE file, all is good. thanks. :) | ||
Skarsnik | m: use NativeCall; my $LIB = ('foo', v1); sub foo is native($LIB) {*}; | ||
camelia | rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/v3FPVmq_BiNo appropriate parametric role variant available for 'NativeCall::Native'at /tmp/v3FPVmq_Bi:1» | ||
ZoffixWin | m: use NativeCall; my $LIB = ('foo', v1); sub foo is native(|$LIB) {*}; | 13:56 | |
camelia | ( no output ) | ||
Skarsnik | m: use NativeCall; my $LIB = ('foo', v1); say $LIB.WHAT; sub foo is native($LIB) {*}; | ||
camelia | rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H1V35R_si8No appropriate parametric role variant available for 'NativeCall::Native'at /tmp/H1V35R_si8:1» | ||
stmuk_ | the Linenoise pod isn't parsed by perldoc (p5) either | ||
Skarsnik | m: use NativeCall; my $LIB = ('foo', v1); say $LIB.WHAT; | ||
camelia | rakudo-moar 775271: OUTPUT«(List)» | ||
Skarsnik | hm | 13:57 | |
stmuk_ | is "=begin pod" valid perl5 pod? | ||
Skarsnik | m: use NativeCall; my $LIB = ('foo', v1); say $LIB.WHAT; sub foo is native(('foo', v1)) {*}; | ||
camelia | rakudo-moar 775271: OUTPUT«(List)» | ||
Skarsnik | I don't get why putting lib does not work | 13:58 | |
ZoffixWin | stmuk_, yes | ||
Skarsnik | The role accept List | ||
Peter- | ZoffixWin, Looks like they didn't get the end of your post, if they had then their comment wouldn't make much sense | ||
ZoffixWin | Peter-, I think some people just like making noise.... | 13:59 | |
[Coke] reads www.infoworld.com/article/3024248/a...?nsdr=true which is positive but not quite right on some details. Woolfy++ for posting the biggest one in the comment section. | 14:00 | ||
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 | |
(just tested) | |||
stmuk_ | ZoffixWin: that explains why perldoc can't parse Linenoise.pm although podchecker says its valid | ||
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:03
_mg_ left
14:05
lnrdo joined
|
|||
MadcapJake | Skarsnik: it works with a @ sigil ^ | 14:05 | |
14:05
_Vi joined
|
|||
Skarsnik | hm, what can I do when precomp stop working? | 14:07 | |
stmuk_ | turn it off and on again? | 14:08 | |
14:08
domidumont joined,
virtualsue joined,
pierre-vigier left,
_mg_ joined,
virtualsue left
|
|||
dalek | rl6-most-wanted: 6f5608a | RabidGravy++ | most-wanted/modules.md: Rename CouchDB |
14:09 | |
14:09
pierre-vigier joined,
_mg_ left
|
|||
Skarsnik | I delete the lib/.precomp and now it complain that it can't find a dep | 14:10 | |
14:10
lnrdo left
14:11
lnrdo joined
14:16
lnrdo left,
harrison_ joined
14:18
skids joined
14:20
FreezerburnV joined,
FreezerburnV left
14:21
FreezerburnV joined
|
|||
RabidGravy | I concluded that renaming ^ was going to stop me worrying about it | 14:24 | |
Skarsnik | ? | 14:25 | |
RabidGravy | Seeing as I've been working very very slowly on it since April it needs to get fixed | ||
14:29
mr-fooba_ left
14:30
ZoffixWin left,
sjoshi left
14:31
sjoshi joined
|
|||
azawawi | what Perl 6 type can be convert to num64? | 14:32 | |
RabidGravy | any that has a .Num as far as I know | 14:33 | |
14:35
harrison_ left
|
|||
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/9laqE94AuMMalformed parameterat /tmp/9laqE94AuM:1------> 3sub foo(num64 $x7⏏5} { $x.say }; foo(10.0); expecting any of: constraint» | ||
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» | ||
jnthn | Needs to be a Num | ||
arnsholt | Try 10.0e0 | ||
jnthn | m: sub foo(num64 $x) { $x.say }; foo(10e0); | ||
camelia | rakudo-moar 775271: OUTPUT«10» | ||
arnsholt | azawawi: Perl 6 decimal constants without exponent are rationals, not floating point objects | 14:37 | |
azawawi | i see thx | ||
timotimo | "anything that has a .Num" isn't enough if the .Num doesn't end up getting called :) | ||
jnthn | Right, types in Perl 6 are (by default) constraints, not coercions :) | ||
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» | ||
Ven | ely-se: ^^ | ||
14:42
pierre-vigier left
|
|||
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» | ||
ely-se | Ven: ^^ | 14:43 | |
ugh I missed the . | |||
whatever | |||
Ven | $x is $!x there :P | ||
14:43
Hathersage joined,
arlenik_ joined
|
|||
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» | ||
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 | pasteboard.co/Z9TfaSL.png # charcoal effect in Perl 6 :) | ||
14:45
ely-se left
|
|||
awwaiid | nice | 14:46 | |
jnap: 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? | ||
I wasn't totally sure :) | |||
awwaiid | hmm. but htat doc is too short | ||
jnap | maybe there's test cases in the p6 repo | 14:48 | |
jnthn | There's doc.perl6.org/language/regexes too | ||
awwaiid | any place where doc.perl6.org is not canonical, it is a bug | ||
jnap | lol, but I'd never know :) | ||
if the docs are right or not... | |||
ok I'll start with that and complain if things don't seem to match up | |||
MadcapJake | docs are currently the most up-to-date source | 14:49 | |
14:50
harryirene joined
14:52
lnrdo joined
14:53
FROGGS joined,
eyck joined
14:55
molaf joined,
sufrostico joined
14:56
ELBeavers joined
14:58
dylanwh left
15:01
ELBeavers left,
Hathersage left,
lnrdo left,
maslan left
|
|||
Skarsnik | RabidGravy, and other NC user. what do you think of gist.github.com/Skarsnik/3da8fbf2d7532ca06bdd | 15:02 | |
15:02
domidumont left,
xpen joined
15:04
dylanwh joined
|
|||
[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 | |
maybe we need to re-arrange how we store the version of the spec...) | |||
FROGGS | [Coke]: it is a on-topic channel about all of these things | 15:05 | |
15:06
domidumont joined
|
|||
RabidGravy | Skarsnik, seems sensible to me | 15:06 | |
[Coke] | Are you just agreeing with me? Can't parse the intent of your send. | ||
FROGGS | [Coke]: I am agreeing yes | ||
15:07
sjoshi left
|
|||
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 ) | ||
arnsholt | Skarsnik: I'd prefer not to overload the native treat to take both a registered name and library name | ||
[Coke] | stmuk_: it's not too late... but it's probably almost too late. | 15:08 | |
FROGGS | yeah | ||
[Coke] | and that's fine. I'd rather the next release be solid. | ||
15:08
xpen left,
lokien_ joined
|
|||
Skarsnik | arnsholt, hm, why? | 15:08 | |
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 | ||
stmuk_ | BTW I'm considering releasing an unofficial MSI (probably just 2015.12 + panda ) this weekend unless anyone is very opposed | ||
arnsholt | Yeah, that could work | ||
Then you could use multidispatch to distinguish is native(Str) and is native(Handle) | 15:10 | ||
gfldex | stmuk_: you can only improve the situation | ||
FROGGS | you can also declare you orn 'is gumbo' trait that applies the 'is native' trait | ||
own* | |||
arnsholt | Oooh, hadn't thought of that. That's a pretty good idea too | ||
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) | ||
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
Ven left
|
|||
[Coke] | (for 2016.xx) that will include only non-spec-breaking bugfixes and improvements. | 15:12 | |
Skarsnik | and for the handle solution. I am not sure how you can do that since the trait is solved at compile time | 15:13 | |
arnsholt | Oh, that's true. But that means that *your* sketched solution won't work either, actually | 15:14 | |
Skarsnik | it work | ||
I just code it xD | |||
stmuk_ | [Coke]: OK | ||
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. :) | ||
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 | ||
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 | ||
arnsholt | Yeah, that's true. But I really don't think the way you're going about it is a very good idea either | ||
Since it relies on something quite specific happening after compile-time. You can't actually sanity-check it at compile-time | 15:17 | ||
Skarsnik | sanity check what? x) | 15:18 | |
15:19
n0tjack joined
15:20
dylanwh left
|
|||
jnthn | fwiw, my expectation was that is native(SomeType) would work some day, where SomeType implements some API used to do library resolution. | 15:20 | |
arnsholt | Yeah, that sounds more reasonable | 15:21 | |
Skarsnik | I am not how you want to use that | ||
15:22
dylanwh joined
|
|||
|Tux| | Shhhhh | 15:23 | |
csv-ip5xs 17.723 | 15:24 | ||
test 22.432 | |||
test-t 11.937 | |||
csv-parser 50.247 | |||
tux.nl/Talks/CSV6/speed4.html + tux.nl/Talks/CSV6/speed5.html | |||
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:25 | |
abraxxa | Skarsnik: finally took the time to rebase my fork of DBIish, PR is updated now | 15:26 | |
Skarsnik | nice :) | ||
jnthn | |Tux|: Fist under 12? :) | 15:27 | |
Uh, first! | |||
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
15:28
ely-se left
15:30
bowtie left
|
|||
azawawi | Skarsnik: any luck with that bug for gptrixie & imagewand header files? | 15:31 | |
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
dylanwh left
|
|||
Skarsnik | All I want is to have my user be able to set and ENV to change the library path | 15:33 | |
I can do that if I pass a sub to the native trait | |||
15:33
dylanwh joined
|
|||
Skarsnik | but its sucks | 15:33 | |
MadcapJake | why does it suck? | ||
azawawi | 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:34
dylanwh left
15:35
bowtie joined,
dylanwh joined
|
|||
azawawi | "Once ImageMagick version 7 is released, we will continue to support and enhance version 6 for a minimum of 10 years." | 15:36 | |
:) | |||
ImageMagick v7 is expected on 1st Q 2016. | 15:37 | ||
Skarsnik | I am updated the gist with a libhandle type | 15:38 | |
but not sure if that could work | |||
15:39
sammers left,
Zero_Dogg left,
Zero_Dogg joined,
jme` joined,
Zero_Dogg left,
Zero_Dogg joined
|
|||
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:40 | |
15:44
jack_rabbit left
|
|||
azawawi | Skarsnik: started it in gptrixie git repo... still parsing :) | 15:45 | |
Skarsnik | take like a minute | ||
15:46
n0tjack left
|
|||
Skarsnik | because there is lot of stuff included | 15:46 | |
azawawi | Skarsnik: "doing magic" on ImageMagick :) | ||
Skarsnik | huhu | ||
azawawi | died in functions... printed constants | 15:47 | |
|Tux| | jnthn, YES! | 15:48 | |
15:48
laz78 joined
|
|||
Skarsnik | This error I guess? | 15:49 | |
Method 'name' not found for invocant of class 'GPT::Class::PointerType' | |||
in sub resolve-type at /root/piko/cpp/gptrixie/lib/GPT/DumbGenerator.pm6 line 71 | |||
15:50
domidumont left
15:51
sammers joined
15:52
stmuk_ is now known as stmuk,
virtualsue joined
|
|||
azawawi | Skarsnik: yup | 15:52 | |
15:53
dylanwh left
|
|||
Skarsnik | I don't get this error (seems like a bt error or something) | 15:53 | |
azawawi | bt = bluetooth? :) | 15:54 | |
or backtrace :) | |||
Skarsnik | backtrace | ||
if you want it fail on a $type ~~ Something && $type.name; but if I displa $type ~~ Something, it false x) | 15:57 | ||
15:57
dylanwh joined
|
|||
azawawi enables Mac OS X Travis CI testing for ImageMagick | 16:02 | ||
Skarsnik | oh, it's new? | 16:03 | |
azawawi | Skarsnik: travis-ci.org/azawawi/perl6-magick.../104123346 | 16:05 | |
16:06
AlexDaniel joined
|
|||
Skarsnik | Oh it was a BT error | 16:09 | |
the issue is on the next line | |||
16:10
mr-foobar joined
|
|||
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:11 | |
16:12
lnrdo joined
|
|||
jnthn | Zero_Dogg: .close the handle(s) you opened | 16:12 | |
uh, output ones | |||
iirc | |||
That blocks until process exit | 16:13 | ||
Skarsnik | should I repport? | ||
m: gist.github.com/Skarsnik/6bff05010aa08d1b7869 | |||
camelia | rakudo-moar 775271: OUTPUT«Method 'piko' not found for invocant of class 'Any' in block <unit> at /tmp/bnUfbGZxf_ line 4» | ||
Skarsnik | it should point to line 5 | ||
ugexe | closing the run handle too early sometimes seems to cause segfaults of its own | ||
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? | ||
jnthn | Zero_Dogg: You'd only have to close the ones you said you wanted | 16:15 | |
At least, that's how I remember it working... :) | 16:16 | ||
ugexe: Reported somewhere, I assume? | |||
16:17
khw joined
|
|||
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:17 | |
+me | 16:18 | ||
16:19
lnrdo left
|
|||
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 | ||
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 | ||
stmuk | Stage parse : 183.238 (maybe I should have spent more than 150 euro-buck-quids on a windows build box) | ||
jnthn | Zero_Dogg: But if you're reading from it then those reads block | ||
Zero_Dogg | jnthn: ah, right | ||
jnthn: thanks | 16:20 | ||
16:20
cc9989 left
16:22
FreezerburnV left,
arlenik_ left
16:23
abraxxa1 joined,
abraxxa left
16:25
sftf joined
16:29
skyl4rk joined
|
|||
Skarsnik | azawawi, update gptrixie, it work fine now (and have fun, it give me nearly 5000 lines) | 16:32 | |
16:33
mr-foobar left
16:36
harryirene left
16:40
maslan joined
|
|||
azawawi runs "zef --force install App::GPTrixie" | 16:40 | ||
16:41
cc9989 joined
16:45
salv0 left
16:46
virtualsue left
16:49
nakiro left
16:52
psy_ joined,
psy_ left
16:53
psy_ joined
16:55
hankache joined
16:56
zakharyas left
|
|||
hankache | hello #perl6 | 16:57 | |
Juerd | Hello hankache | ||
hankache | hi Juerd | ||
16:58
abraxxa1 left
17:00
leont joined
17:04
cc9989 left,
telex left
17:06
telex joined
|
|||
azawawi | Skarsnik++ # thx :) | 17:08 | |
Skarsnik | excluding std/pthread stuff is my todo list x) | 17:09 | |
17:09
lokien_ left
|
|||
Skarsnik | I will need it for c++ that a simple include <string> is like 30 additionnals headers x) | 17:10 | |
17:10
maslan left
|
|||
azawawi | hmm, MacOS X travis CI containers are faster to boot/run vs linux precise builds | 17:14 | |
17:15
mcmillhj left,
mcmillhj joined
17:16
xtreak joined,
nadim joined
17:25
jack_rabbit joined,
Calibellus joined
17:26
sjoshi joined
17:28
xtreak left
|
|||
RabidGravy | Oooh I didn't know there were MacOS containers | 17:31 | |
17:31
domidumont joined
|
|||
RabidGravy | is it a fairly standard OS build? | 17:32 | |
azawawi | can one depend on more than version in a native trait e.g. is native('libfoo', v1, v2) etc? | 17:34 | |
sortiz | azawawi, Nop. | 17:35 | |
17:35
domidumont left
|
|||
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... | ||
RabidGravy | yes | ||
azawawi | what's the point of having symbolic links / ABI compatiblity | 17:36 | |
geekosaur | ? | ||
sortiz | Unless you use a Str with a full path, so no version is checked. | ||
geekosaur | the .so without the version selects what version you link against at compile time; it's not an ideal solution but it works | ||
sortiz | Not when a Callable is involved. | ||
s/Not/NOr/ | 17:37 | ||
17:37
lnrdo joined
|
|||
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:37 | |
17:38
domidumont joined
|
|||
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:38 | |
azawawi, ^ | 17:39 | ||
typing too fast | |||
azawawi | im already looking at it :) | ||
RabidGravy | cool | ||
azawawi | e.g. i have libmagickwand4 and libmagickwand5 to support which are in the 6.x range (precise...trusty) | 17:40 | |
geekosaur wants :api which could in theory take a range | 17:42 | ||
still need to put that whole thing together | |||
azawawi | docs.travis-ci.com/user/languages/perl6 # still has rakudobrew build-panda | ||
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:45
leont left,
jack_rabbit left
17:48
TimToady left,
ely-se joined
17:49
kanishka left
17:50
_Vi left,
TimToady joined
|
|||
ely-se | Oh boy, writing a type checker in Perl 6. | 17:54 | |
17:54
Actualeyes left
17:57
leont joined
18:02
laz78 left
18:06
perl6newbee joined
18:07
molaf left
|
|||
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 | |
I did that in 2009 once already | |||
(iX by heise.de) | |||
RabidGravy | GWAN! DO IT! | ||
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» | ||
moritz | RabidGravy: I will :-) | 18:21 | |
18:22
_nadim joined
|
|||
RabidGravy | yay! | 18:24 | |
18:25
nadim left,
sftf left,
molaf joined
|
|||
RabidGravy | the dumbest solutions are best: | 18:26 | |
m: class Foo is Array { method bar() { say "jjsjs"; }}; class Bar { has @.a is Foo; }; Bar.new.a.bar | |||
camelia | rakudo-moar 775271: OUTPUT«jjsjs» | ||
18:26
lnrdo left,
_nadim left
18:28
musiKk joined
|
|||
[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 :-) | ||
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
|
|||
stmuk | does linenoise work on windows? | 18:35 | |
18:36
ELBeavers left
|
|||
hoelzro | stmuk: yes | 18:40 | |
I just tested it with the latest rakudo as of wednesday | |||
ely-se | m: subset T of Str | ||
camelia | ( no output ) | ||
ely-se | does that default to where { True }? | ||
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 | ||
hoelzro | m: subset T of Str; my S $s = '' | ||
camelia | rakudo-moar 775271: OUTPUT«5===SORRY!5===Type 'S' is not declaredat /tmp/lQ2AhStefU:1------> 3subset T of Str; my S7⏏5 $s = ''Malformed myat /tmp/lQ2AhStefU:1------> 3subset T of Str; my7⏏5 S $s = ''» | ||
hoelzro | m: subset T of Str; my T $s = '' | ||
camelia | ( no output ) | ||
hoelzro | stmuk: dammit, Hotkeys had that same problem...which version of Windows are you on? | ||
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 | ||
hoelzro | hmm | ||
I have it working on win10...but using mingw | |||
18:43
addison_ joined
|
|||
PerlJam | moritz: write for them one time about Perl 6 or regularly? | 18:43 | |
moritz | PerlJam: one time | 18:44 | |
PerlJam | I was so hoping for the latter :) | ||
moritz | 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 | |
18:45
maslan joined
|
|||
moritz | the fractal generator now runs in 2.4s | 18:45 | |
(on a machine that's from 2006 or so, so it's not just hardware :-) | 18:46 | ||
18:48
Djibril joined
|
|||
moritz | and adding two "int" annotations speeds it up to 1.4s | 18:48 | |
PerlJam | That might make a good story for others to support jnthn's grant. | 18:50 | |
18:50
Djibril left
|
|||
sjn is looking at rosettacode examples | 18:54 | ||
rosettacode.org/wiki/Multiline_shebang#Perl_6 doesn't work any more :-\ | |||
18:54
pochi_ is now known as pochi
|
|||
RabidGravy | moritz for reference it runs in 0.64 seconds here | 18:54 | |
this is a five year old i7 | 18:55 | ||
18:55
addison_ left
|
|||
RabidGravy | tiny weeny little mandelbrot though | 18:57 | |
[Coke] points at twitter.com/cokefloats/status/6906...4424042500 | |||
PerlJam | [Coke]++ | 18:58 | |
[Coke] | PerlJam++ | ||
[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
19:03
maslan left,
kmel joined
19:04
leont left
19:06
kmel left,
hankache left,
kmel joined
19:07
kmel left,
Actualeyes joined
19:09
hankache joined
19:10
molaf left
|
|||
RabidGravy | [Coke], retweeted (twice for good measure ;) | 19:14 | |
gfldex | S11 claims: It is also possible to re-export the imported symbols: | 19:16 | |
use Sense :EXPORT; | |||
is that implemented? | |||
19:17
autarch1 joined
|
|||
moritz | I don't think so | 19:20 | |
PerlJam | gfldex: see github.com/perlpilot/p6-Test-Class...ass.pm6#L6 | ||
moritz | ok, please help me brainstorm: what's the key points of development in Perl 6 since 2009? | 19:22 | |
nom/MOP, moarvm, concurrency, Graphemes come to mind | |||
19:23
laz78 joined
|
|||
PerlJam | those are the big ones | 19:23 | |
GLR too | 19:24 | ||
RabidGravy | Oooh, PerlJam++ it never occurred to me that I could do that | ||
19:25
ely-se left
19:28
perl6newbee left
19:31
Amendil left
|
|||
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
|
|||
moritz | jnthn: I'm going to quote you on that :-) | 19:45 | |
azawawi | github.com/perl6/roast/blob/master...INET.t#L25 # Maybe broken since on linux | 19:46 | |
m: say $*DISTRO.name; | 19:48 | ||
camelia | rakudo-moar 775271: OUTPUT«opensuse» | ||
azawawi | so how does one determine that he's running on darwin, linux, ...etc | 19:49 | |
jnthn | m: say $*KERNEL.name | ||
camelia | rakudo-moar 775271: OUTPUT«linux» | ||
jnthn | Maybe the test file should use that | 19:50 | |
sjn | \o | ||
hankache | o/ | ||
moritz | oh, I guess in 2009 we didn't have much gradual typing either, did we? | 19:51 | |
I mean, compile time checks of types and stuff | |||
azawawi | moritz: so this is basically skipped on linux github.com/perl6/roast/blob/master...INET.t#L25 | 19:53 | |
RabidGravy | If I wanted to re-export a trait would I do something like "sub EXPORT { { '&trait_mod:<is>' = &trait_mod:<is>.dispatcher }} | 19:54 | |
19:55
maslan left
19:58
hankache left
19:59
pmurias joined
|
|||
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 :) | ||
pmurias: Certainly | 20:00 | ||
pmurias: The natives are handled in a very static way | |||
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 | ||
jnthn | I don't expect to statically check method calls in general | ||
OO is muchly about late binding. | 20:02 | ||
The lexical = early bound, object = late bound distinction is fairly fundemental in Perl 6. | |||
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 | ||
pmurias | Perl 6 seems more about sprinkling a bunch of type check to check if things are sane | ||
arnsholt | pmurias: Right. Perl 6 comes at it from the other direction, adding types to a dynamic system | 20:04 | |
Whether those two things should have different names is a fair question, I guess =) | |||
jnthn | I think both are fair to call gradual typing | 20:05 | |
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:07 | |
20:09
autarch1 left,
sjoshi left
|
|||
jnthn | Usually not 'cus the default new just delegates to bless | 20:12 | |
20:13
darutoko left,
ely-se joined
|
|||
timotimo | well, if we know the default is in use, we can go introspecting the BUILDALLPLAN | 20:13 | |
that'll conveniently also tell us if there's custom BUILD methods involved | 20:15 | ||
pmurias | it would be fun if at some point it was possible to import a static type system from CPAN | 20:17 | |
jnthn | pmurias: Should be possible, especially once the slang stuff lands. | 20:18 | |
20:20
skyl4rk left
|
|||
sjn likes "optional typing" | 20:21 | ||
ely-se doesn't | 20:22 | ||
too hard to tell what can be relied on | 20:23 | ||
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:24 | |
masak | RabidGravy: you want the array to *automatically* delete elements? | 20:25 | |
RabidGravy | yeah | ||
masak | ...why? | ||
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? | ||
moritz surprised | |||
masak | moritz: that's how I remember it | ||
pmurias | ely-se: isn't it pretty clear in Perl 6 what can be relied on? | ||
ely-se | no. | 20:27 | |
nor in other "optionally typed" languages like TypeScript and Dart | |||
moritz | masak: I guess my surprise stems from the fact that I learned about MoarVM much later | ||
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
khw left
|
|||
jnthn | moritz: Yes, MoarVM was develoepd in secret for a while | 20:28 | |
'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 | ||
jnthn | And wanted to design in at my own pace and in peace. :) | ||
Skarsnik | azawawi, what is the name of imagemagic lib? | ||
RabidGravy | and because the object has been deleted it shouldn't be in the containing object any more | ||
timotimo | imagemagick, usually | ||
jnthn | And if I came up with nothing interesting, then I'd not have disappointed everyone. :) | 20:30 | |
Happily, everything worked out well. :) | |||
Skarsnik | I mean the so files ) | ||
moritz | jnthn: aye :-) | ||
jnthn bbt :) | 20:31 | ||
timotimo | gnite jnthn | ||
azawawi | Skarsnik: you mean magickwand or core lib? | ||
Skarsnik | hm libmagickcore-6.q16-2: /usr/lib/i386-linux-gnu/libMagickCore-6.Q16.so.2 | 20:32 | |
look likeit a case of the need for pkg-config probably | |||
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 | ||
ely-se | that sounds like quite a terrible design | ||
20:32
rindolf left
|
|||
ely-se | you're coupling a value to an array it happens to be an element of | 20:33 | |
20:33
khw joined
|
|||
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 | ||
timotimo | actually, the element can notify multiple arrays of its deletion wish | ||
moritz | RabidGravy: maybe you should give us a broader view of what you want to achieve | ||
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 | ||
20:35
cpage_ left
|
|||
timotimo | just make sure iteration over the array makes sense when things get kicked out | 20:35 | |
20:36
khw left
|
|||
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? | ||
RabidGravy | (which would require signalling the higher level object in some other way anyway ) | 20:38 | |
no | |||
moritz | if talk about "pools" instead of "arrays", things sound less spooky to me :-) | ||
*if you | |||
RabidGravy | yeah sure | 20:39 | |
moritz | and no, I don't think there's something premade for it | 20:40 | |
Skarsnik | any though on plop2 gist.github.com/Skarsnik/3da8fbf2d7532ca06bdd ? | 20:44 | |
20:45
firstdayonthejob joined
|
|||
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> | ||
camelia | rakudo-moar 775271: OUTPUT«lib%s.so» | ||
RabidGravy goes for a brute force method | |||
moritz | "when in doubt, use brute force" | 20:48 | |
ely-se | that's *not* what she said | ||
20:49
_Vi joined
|
|||
moritz | ely-se: no, what did she say? :-) | 20:49 | |
ely-se | "use Perl 6" | ||
Skarsnik | azawawi, there is a $*DISTRIB I think | 20:50 | |
moritz | ely-se: fairynuff | ||
Skarsnik | hm, what was the syntax to say what an arg on main is for? pod why? like #| hello? | 20:54 | |
20:54
Amendil joined
20:55
laz78 left
|
|||
azawawi | travis-ci.org/azawawi/perl6-magickwand # build passing on travis ci linux and osx :) | 20:55 | |
RabidGravy | azawawi++ # go! go! go! | 20:56 | |
Skarsnik | nice | ||
20:57
espadrine left
|
|||
Skarsnik | azawawi, hm major version for me is 2 | 20:58 | |
well it's imagemagick3 on debian stable, probably why | 20:59 | ||
*graphicmagick | |||
or this one? libmagickwand-6.q16-2: /usr/lib/i386-linux-gnu/libMagickWand-6.Q16.so.2 | |||
azawawi | this one | 21:01 | |
this is a wrapper for magickwand C-based API | |||
www.imagemagick.org/script/magick-wand.php | 21:02 | ||
Skarsnik | you can do use NativeCall :ALL; return guess_library_name((LIB, v4)) in your lib stuff x) | 21:04 | |
azawawi | i see... thanks | ||
Skarsnik | if you don't want to bother doing the plateform translation | ||
azawawi | but is it a stable API? | 21:05 | |
21:05
maslan joined
|
|||
Skarsnik | well originaly it exportable for me to write test x) | 21:06 | |
21:06
xpen joined
|
|||
Skarsnik | You can try $*VM.platform-library-name($libname.IO, :version(v5).Str; it will probably not be changed | 21:08 | |
21:08
fireartist joined
21:09
pi1 left
21:10
xpen left
21:11
pi1 joined
|
|||
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 | ||
RabidGravy | I'm going to have make an exception called TeenSpirit so I can have a "throws-like { ...}, TeenSpirit;" | ||
Skarsnik | xD | ||
azawawi | One needs to restart CI builds every 1 day at least to have good testing results vs latest | 21:13 | |
s/latest/rakudo latest/ | |||
21:14
Begi joined
|
|||
Begi | Hi. I've a question : If I write a second module for Gravatar, will it be accecpted ? | 21:14 | |
Skarsnik | Gravatar? | ||
Begi | to generate avatar from an email | 21:15 | |
a simple API | |||
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 | |||
RabidGravy | Begi, why would anyone? After all there are four JSON parsers and five HTTP clients, the more the merrier ;-) | ||
Skarsnik | Begi, probably ask the author of the first if you want a different API? | 21:16 | |
still no breaking UA into 2 modules? | |||
Begi | Sorry, I've not time. I'll look that later. Thansk and good night #per6 ! | 21:18 | |
21:18
Begi left
21:19
domidumont left
21:20
lnrdo joined
|
|||
ely-se | m: class A { has B $.x; }; class B { } | 21:22 | |
camelia | rakudo-moar 775271: OUTPUT«5===SORRY!5===Type 'B' is not declaredat /tmp/I_ABsAbGzH:1------> 3class A { has B7⏏5 $.x; }; class B { }Malformed hasat /tmp/I_ABsAbGzH:1------> 3class A { has7⏏5 B $.x; }; class B { }» | ||
ely-se | any nice way to do this without moving definition of B before definition of A? | ||
timotimo | just have class B { ... } in front of class A | 21:25 | |
that's how you declare stubs in p6 | |||
ely-se | ah ok | 21:26 | |
21:27
laz78 joined
|
|||
ely-se | then I get a redeclaration error at the non-stub definition | 21:27 | |
timotimo | then you didn't spell it "..." | 21:28 | |
m: class B { ... }; class A { has B $.x; }; class B { } | |||
camelia | ( no output ) | ||
ely-se | I absolutely did. | 21:30 | |
timotimo | that's strange | ||
can you show the code? | |||
hopefully it's not a nasty bug :S | 21:31 | ||
21:31
ajr_ joined
|
|||
ajr_ | In P5 "die message\n" kills the program without specifiying the line number. Where can I find the P6 equivalent? | 21:32 | |
21:35
Timbus left
|
|||
timotimo | note "oh no!"; exit(1); | 21:35 | |
Skarsnik | ely-se, if it's in two separate file it does not work x) | ||
masak | ajr_: what timotimo said. I usually define a subroutine for that. | ||
21:36
Timbus joined
|
|||
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» | ||
moritz | m: class X::WithoutLineNumber is X::AdHoc { method gist { $.payload } }; die X::WithoutLineNumber.new(payload => "message") | ||
camelia | rakudo-moar 775271: OUTPUT«message» | ||
moritz | that way it's still catchable. | ||
21:42
maslan left
|
|||
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 :) | ||
ely-se | found the PHP programmer | 21:44 | |
moritz | doc.perl6.org/language/exceptions | ||
timotimo | what do you mean, ely-se? | ||
ely-se | timotimo: in PHP, die exits the program | 21:45 | |
timotimo | oh | ||
21:45
pmurias left
|
|||
ely-se | this is ironic doc.perl6.org/type/X%3A%3AIO%3A%3ADoesNotExist | 21:45 | |
I think it should stay that way forever | |||
mspo | that could be the 404 page | 21:46 | |
SmokeMachine___ | is there a way to declare a class attribute as lazy? | 21:49 | |
ajr_ | Thanks, moritz. | ||
ely-se | m: Cool.new.perl.say; Cool.new.say | 21:50 | |
camelia | rakudo-moar 775271: OUTPUT«Cool.newCool.new» | ||
ely-se | m: Cool.new.sqrt | ||
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» | ||
ajr_ | ely-se "die" does that in P5 and P6 - it's just the unwanted line number I was trying to suppress. | 21:51 | |
dalek | c: d0dae21 | moritz++ | doc/Language/exceptions.pod: Mention way to suppress backtrace |
21:52 | |
21:52
kaare_ left
|
|||
ajr_ | A whole class to do that in P6 seems like a complicated regression. | 21:52 | |
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) | ||
why whould you want to die without the backtrace? | |||
masak | ajr_: you don't need a whole class. | 21:54 | |
ajr_: just two statements, possibly wrapped in a convenience subroutine. | |||
ajr_ | Maybe I'm misreading your 16:37 message? | 21:55 | |
PerlJam | SmokeMachine___: you mean you want to delay initialization until first use? | 21:57 | |
SmokeMachine___ | PerlJam: yes, and if never used, never initialized... | ||
ajr_ | Sorry, masak, I meant moritz's | ||
SmokeMachine___ | PerlJam: just like perl5 moose has' lazy "adverb"... | 21:58 | |
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. | 21:59 | |
22:00
skids left
|
|||
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:01 | |
22:01
addison__ left
22:04
wtw left
22:09
ELBeavers joined,
geraud joined
|
|||
ajr_ | The note/exit construction does what I want. The subtle change in "die" will definitely be a topic for 5->6 training. | 22:10 | |
22:13
ELBeavers left
|
|||
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:14 | |
22:15
roguelazer left,
roguelazer joined
|
|||
RabidGravy | there's scope for putting that in a trait I guess | 22:15 | |
22:16
TEttinger joined,
roguelazer left
22:17
roguelazer joined
|
|||
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 | ||
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)"? | ||
RabidGravy | I would have made the module | ||
timotimo | gimme a minute. | 22:20 | |
bdc66e79daa19d54e2467e65bb97fedb52e08b6e | 22:21 | ||
a rakudo commit | |||
github.com/rakudo/rakudo/commit/bd...db52e08b6e | |||
22:22
addison_ joined
|
|||
[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 | ||
(gist.github.com/coke/21c70b50e3cce8d88347 if you want to read it but don't have FB) | |||
timotimo | could you rename gistfile1.txt to gistfile1.md so it soft-wraps the text? | 22:24 | |
22:24
sufrostico left
22:26
lnrdo left
|
|||
RabidGravy | timotimo¸ that looks entirely doable | 22:27 | |
timotimo | good luck! | ||
[Coke] | timotimo: done | ||
timotimo | TYVM | ||
[Coke] | timotimo: redone | 22:28 | |
timotimo | ah, yes | ||
i think it'd be good to spell "use v6.c" (or something) out in point 4 | |||
otherwise people may think they have to "use ThatOneFeature; use ThatOtherFeature; no NotThatFeature;" | 22:29 | ||
cool. i really like your text | 22:30 | ||
[Coke] | updatd 4 | ||
Skarsnik | Should NC start having version? | 22:31 | |
timotimo | that's what i was wondering about, too | ||
[Coke] | can it without the 6.c spec changing? | ||
[Coke] heads out | |||
timotimo | well, nativecall isn't part of the spec test suite, is it? ;) | 22:32 | |
but we might want to extend versioning out to it anyway | |||
Skarsnik | NC is lacking too much (IMO) to be tagged like 6.c | ||
but having a version could be nice | 22:33 | ||
timotimo | yeah, NC is amazing, but there's still a ways to go. | ||
Skarsnik | The issue with NC is... (for 6.c stuff) what is tested in nqp/moar that is here for NC | ||
NC.pm is small | 22:34 | ||
timotimo | that's true | ||
Skarsnik | You will that funny, but lot of NC missing/undef stuff make mad when I work on gptrixie | 22:37 | |
like "How I should generate this? There is 2-3 way to solve it" | |||
I am not even sure how I should handle ref x) | |||
22:39
addison_ left
22:40
yqt joined
|
|||
Skarsnik | good night #perl6 | 22:42 | |
22:43
addison_ joined
|
|||
masak | 'night, #perl6 | 22:45 | |
22:48
addison_ left
|
|||
timotimo | gnite Skarsnik | 22:49 | |
22:50
sufrostico joined
|
|||
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…» | ||
flussence | some fun LHF: figure out how to make the first error go away ;) | ||
timotimo | doesn't matter, you'll never get a $tc for the currently running program | 23:01 | |
if you do, hmm. | |||
23:02
musiKk left
23:03
azawawi left
23:06
mr-foobar joined
|
|||
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
|
|||
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:10 | |
Skarsnik | PERL6LIB=lib prove ... | 23:11 | |
fireartist | thanks, I'll try that! | ||
RabidGravy | or prove -e "perl6 -Ilib" ... | ||
depending on taste | 23:12 | ||
isn't there a prove6 in the house nowadays? | |||
23:12
M-Illandan left
|
|||
fireartist | PERL6LIB=lib is working - I can tell by how long it's taking :-) | 23:12 | |
all tests pass - I've just written my first perl6 code since the pugs project was a thing! | 23:14 | ||
23:16
kid51 joined
|
|||
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 parensat /tmp/m_y8fGCE1Q:1------> 3if7⏏5(True) { say 'hi'; }Unexpected block in infix position (two terms in a row)at /tmp/m_y8fGCE1Q:1…» | ||
ely-se | m: if (True) { say 'hi'; } | ||
camelia | rakudo-moar 775271: OUTPUT«hi» | ||
ely-se | does Perl 6 have any reserved words? | ||
timotimo | hm | 23:20 | |
sometimes it's hard to call something "class" | |||
without the parser seeing broken class definitions everywhere | |||
m: my \class = 10; say class; | |||
camelia | rakudo-moar 775271: OUTPUT«10» | ||
llfourn | m: class class {}; say class.new; | ||
camelia | rakudo-moar 775271: OUTPUT«class.new» | ||
llfourn | :) | ||
timotimo | m: sub class; say class; | ||
camelia | rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/23XS4i05HEA 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;» | ||
timotimo | m: sub class { }; say class; | 23:21 | |
camelia | rakudo-moar 775271: OUTPUT«Nil» | ||
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 | ||
timotimo | yeah, it doesn't | ||
23:21
addison_ joined
|
|||
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 | ||
camelia | ( no output ) | ||
ely-se | so I'll see if I can use some BEGIN trickery of some sort | ||
well I don't think I have to actually | 23:23 | ||
I only have to list them once | |||
23:23
BenGoldberg joined
23:25
ely-se left,
Skarsnik left
|
|||
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:28 | |
23:31
skids joined
23:32
leont left
|
|||
timotimo | good work | 23:35 | |
RabidGravy | anyway beddy byes for Rabid | 23:38 | |
toodles people | |||
23:41
fireartist left
23:42
woodruffw left
23:43
RabidGravy left
23:46
woodruffw joined,
woodruffw left
23:47
woodruffw joined
23:49
addison_ left
|
|||
ajr_ | Is there something native in P6 equivalent to "curl", or should I be looking at ways to execute in a subshell? | 23:49 | |
AlexDaniel | there is a bunch of modules for this… | 23:50 | |
does anybody know what is the best one? | |||
I remember some did not work with https | 23:51 | ||
llfourn | well RabidGravy just updated: github.com/sergot/http-useragent | ||
I wonder if anyone has written a promise based one | 23:53 | ||
AlexDaniel | there's also github.com/shoichikaji/perl6-HTTP-Tinyish and github.com/azawawi/perl6-net-curl | ||
llfourn | and LWP::Simple while we're at it | ||
AlexDaniel | yeah | 23:54 | |
23:55
pierre-vigier joined
|
|||
ajr_ | I think I need to execute some commands in a subshell anyway. Pointer to docs, please? | 23:57 | |
AlexDaniel | ajr_: doc.perl6.org/routine/run | ||
ajr_: or if you insist on shell then 「shell」 or qx | 23:58 |