»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
00:00
Psyche^ joined
|
|||
raiph | m: say ٧၇௭႗ ~~ /7*/ | 00:02 | |
camelia | rakudo-moar 2ad739: OUTPUT«「7777」» | ||
raiph | m: say ௭ | 00:03 | |
camelia | rakudo-moar 2ad739: OUTPUT«7» | ||
[Coke] | lizmat: I run spectests with "prove -v -e t/fudgeandrun t/spec/..." | ||
raiph | .u ௭ | ||
yoleaux | U+0BED TAMIL DIGIT SEVEN [Nd] (௭) | ||
TimToady | m: say ٧၇௭႗ | 00:07 | |
camelia | rakudo-moar 2ad739: OUTPUT«7777» | ||
TimToady | wow, when did that happen? | 00:08 | |
m: say '٧၇௭႗' # just checking | |||
camelia | rakudo-moar 2ad739: OUTPUT«٧၇௭႗» | ||
TimToady | whew! | ||
m: say ⅐ | 00:09 | ||
camelia | rakudo-moar 2ad739: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/N4rih2_AWJ:1------> 3say7⏏5 ⅐Bogus postfixat /tmp/N4rih2_AWJ:1------> 3say 7⏏5⅐ expecting any of: infix infix stopper pos…» | ||
TimToady | aww | ||
00:10
skids joined
00:11
Peter_R left
00:14
tardisx left
|
|||
[Coke] | m: say ¡Aye! | 00:15 | |
camelia | rakudo-moar 2ad739: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/fpdjFnsGp7:1------> 3say7⏏5 ¡Aye!Bogus postfixat /tmp/fpdjFnsGp7:1------> 3say 7⏏5¡Aye! expecting any of: infix infix stopper …» | ||
00:17
tardisx joined
|
|||
zacts | \o/ I just installed perl6 for the first time ever using rakudobrew | 00:23 | |
"a journey of a thousand miles begins with a single step..." I guess... | |||
:-) | |||
00:26
mr_ron left,
hankache left,
hankache joined
|
|||
timotimo | cool | 00:27 | |
let us know if you have any questions | |||
00:27
mr_ron joined
|
|||
zacts | sure | 00:28 | |
00:29
hankache left
|
|||
timotimo | though i myself will be going to bed soon | 00:29 | |
00:52
softmoth_ left
00:53
aaronn left
01:04
perlawhirl left
01:08
raiph left,
espadrine left
01:15
mr_ron left
01:16
raiph joined
01:17
mr_ron joined
01:23
sprocket left
01:31
softmoth_ joined
01:42
tardisx left
|
|||
flussence | timotimo / Zoffix : I'd advise not getting too eager with HSTS just yet; I don't think all the *.perl6.org subdomains are set up for HTTPS. | 01:45 | |
Zoffix | I don't plan on messing with that any time soon :) | 01:46 | |
flussence | just thought I'd mention it, I learned to be careful with it the hard way :) | ||
Zoffix | Sure :) | ||
01:53
[particle] left
01:59
Herby_ joined
|
|||
Herby_ | Good evening, everyone! | 01:59 | |
02:06
tardisx joined
|
|||
Zoffix | \o | 02:08 | |
02:09
raiph left
02:18
xpen joined
02:19
sufrostico left
02:21
dayangkun joined
02:22
raiph joined
02:23
telex left
02:24
telex joined
|
|||
llfourn | can you say "defined but Nil is ok" with types. Like Maybe[Int] in p6 Type::Tiny | 02:25 | |
p5 Type::Tiny* | |||
02:26
raiph left
|
|||
llfourn | m: my Int:D $a = Nil; say $a; | 02:26 | |
geraud | isn't that Int:U ? | ||
camelia | rakudo-moar 2ad739: OUTPUT«(Int:D)» | ||
llfourn | geraud: but Int:U also matches Int | 02:27 | |
02:27
mr_ron left
|
|||
llfourn | m: class A { has Int:D $.a = Nil }; say A.new.a | 02:29 | |
camelia | rakudo-moar 2ad739: OUTPUT«(Int:D)» | ||
llfourn | so Nil is ok in any :D type aye.... | ||
what if I want to say not an acutal Int that is never undef or Nil :\ | 02:30 | ||
02:35
Gar joined,
tardisx left,
Gar left,
geraud left
02:36
tardisx joined
02:37
yqt left
02:38
geraud joined
02:39
kid51 joined
|
|||
Herby_ | I'm new to programming, and have dipped my toes into Perl 5. I'm interested in learning Perl 6 | 02:42 | |
Is there something similar to __DATA__ in perl 6? | |||
llfourn | Herby_: I don't think so. There is heredoc stuff though. | ||
docs.perl6.org/language/quoting#Her...s%3A_%3Ato | 02:43 | ||
02:43
finanalyst joined
|
|||
llfourn | oh and Welcome :) | 02:43 | |
Herby_ | I'll take a look, and thanks! | ||
finanalyst | Hi. trying HTML::Template. Errors on tests when installing. A problem in Grammar.pm:42 | 02:45 | |
Is this a known problem? | |||
llfourn is trying it now | 02:46 | ||
finanalyst: it actually worked for me :\ | |||
which test? | |||
Zoffix | finanalyst, how old is your perl? | 02:48 | |
finanalyst | Zoffix, perl6 version 2015.09-381-g271e84c built on MoarVM version 2015.09-79-gee9fc2b | 02:49 | |
used panda update | |||
llfourn | finanalyst: windows? | ||
finanalyst | ubuntu | 02:51 | |
02:52
raoulvdberge left
|
|||
llfourn | finanalyst: can you do rakudobrew build moar? | 02:52 | |
Zoffix | finanalyst, I'm on a fork of ubuntu and installs fine. My perl is newer, so maybe try upgrading perl? perl6 version 2015.09-442-ge303970 built on MoarVM version 2015.09-79-gee9fc2b | ||
llfourn | this is mine where it works: This is perl6 version 2015.10-220-g4988c70 built on MoarVM version 2015.10-61-g624d504 | ||
finanalyst | ok will try thanks. | ||
just come back to perl6 after a while. What is best way to upgrade?# | 02:53 | ||
02:53
kaare_ joined
|
|||
llfourn | finanalyst: use github.com/tadzik/rakudobrew :) | 02:53 | |
Zoffix | finanalyst, run rakudobrew build moar | ||
finanalyst | thanx. trying now | 02:54 | |
is there a way for panda to run the tests for a specific module? | 02:56 | ||
02:57
kid51 left
|
|||
llfourn | finanalyst: you can run tests manually with panda look module_name | 02:57 | |
then perl6 -Ilib t/the_test_you want | |||
Zoffix | And you can panda look Some::Module to download it and drop a shell into it | 02:58 | |
02:58
Herby_ left,
tardisx left
|
|||
finanalyst | llfourn and Zoffix, thank you very much. Upgrade solved problem | 03:00 | |
03:00
[particle] joined
|
|||
llfourn | \o/ | 03:00 | |
Zoffix | \o/ | ||
finanalyst | very impressed how much faster perl6 is now. A joy! | 03:01 | |
03:13
roguelazer joined
03:15
tardisx joined,
sprocket joined
03:18
sprocket left
03:22
BenGoldberg joined
03:26
yuppie joined,
yuppie left,
yuppie joined,
xpen left
03:29
herby_ joined,
yuppie left
03:30
yuppie joined,
yuppie left,
yuppie joined,
yuppie left
|
|||
herby_ | is modules.perl6.org the "CPAN" of perl 6? | 03:30 | |
Zoffix | herby_, for now, yes | ||
03:31
yuppie joined,
yuppie left,
yuppie joined
03:32
yuppie left,
yuppie joined,
yuppie left,
yuppie joined
|
|||
herby_ | great, thanks | 03:33 | |
Zoffix gives yuppie a brand new CAT5 cable | 03:34 | ||
03:36
mr_ron joined
03:48
herby_ left,
xpen joined
03:53
kaare_ left
|
|||
awwaiid | wait... we have undef AND nil? | 03:54 | |
llfourn | awwaiid: if you are refering to my confusion we have undef in that (Int) is undefined :) | ||
m: say Int.defined | 03:55 | ||
camelia | rakudo-moar 2ad739: OUTPUT«False» | ||
llfourn | awwaiid: I read the design docs a bit and it seems that Nil is basically like a Failure | 03:56 | |
but without an error message | |||
m: say \(Nil) ~~ :(Int:D) | |||
camelia | rakudo-moar 2ad739: OUTPUT«False» | ||
llfourn | so that won't work | 03:57 | |
m: class A { has Int:D $.a = Nil }; say A.new; | |||
camelia | rakudo-moar 2ad739: OUTPUT«A.new(a => Int:D)» | ||
llfourn | but that will work | ||
BenGoldberg | Nil is a value which magically disappears in most contexts. | ||
awwaiid | here and I was bragging that Int:D would only hold defined ints! | 03:58 | |
BenGoldberg | It's not quite the same as () in perl5, but it's close. | ||
llfourn | awwaiid: it's right to describe it like that | ||
As BenGoldberg++ said it depends on the context | |||
you don't use it like undef in p5 | 03:59 | ||
03:59
tardisx left
|
|||
BenGoldberg | m: say [ 1, 2, Nil, 3 ] | 03:59 | |
camelia | rakudo-moar 2ad739: OUTPUT«[1 2 (Any) 3]» | ||
BenGoldberg | m: say [ 1, 2, |Nil, 3 ] | ||
camelia | rakudo-moar 2ad739: OUTPUT«[1 2 (Any) 3]» | ||
Zoffix | Could powers-that-be give awwaiid merge perms to perl6 repos? They've been submitting a ton of PRs for the docs. Would be nice for them not to have to wait for someone to come around and merge. | 04:00 | |
BenGoldberg | m: say [ 1, 2, Splat, 3 ] | ||
camelia | rakudo-moar 2ad739: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uJHCnPiSLpUndeclared name: Splat used at line 1» | ||
Zoffix | s/merge perms/commit perms/; | ||
04:00
Actualeyes left
|
|||
awwaiid | Zoffix: I got merge perms yesterday | 04:00 | |
Zoffix | Oh | ||
awwaiid | But I thought that was so I could merge other people's things :) | ||
llfourn | "The Nil value represents the absence of a value where there should be one, so it does not disappear in list context, but relies on something downstream to catch it or blow up." | 04:01 | |
awwaiid | I'm used to the formality of two-human-merges at $work | ||
Zoffix | I don't see a perl6 org bande on your profile | ||
awwaiid | well. here, lmme merge this and we'll see... | ||
04:01
Actualeyes joined
|
|||
dalek | c: 0a3175f | (Brock Wilcox)++ | doc/Language/syntax.pod: More syntax.pod additions, especially about operators |
04:01 | |
c: 7951121 | (Brock Wilcox)++ | doc/Language/syntax.pod: Oops, fix where :D goes |
|||
c: e3d793c | (Brock Wilcox)++ | doc/Language/syntax.pod: Merge pull request #191 from awwaiid/syntax-operator-basics More syntax.pod additions, especially about operators |
|||
awwaiid | seems like cheating :) | ||
Zoffix | m: my Int $x where * > 3 = 7; $x = 2 | ||
camelia | rakudo-moar 2ad739: OUTPUT«Type check failed in assignment to $x; expected <anon> but got Int in block <unit> at /tmp/b7TIsQGI0u:1» | ||
awwaiid | m: my Int $x where * > 3 = 7; $x = Nil; say $x | 04:02 | |
camelia | rakudo-moar 2ad739: OUTPUT«(<anon>)» | ||
llfourn | qwerky isn't it :) | ||
awwaiid | Nil is looking a lot like the new null | ||
llfourn | awwaiid: but it's not like null for calling code | 04:03 | |
m: sub a (Int:D) { 'win'.say }; a(Nil); | |||
camelia | rakudo-moar 2ad739: OUTPUT«Type check failed in binding <anon>; expected Int but got Nil in sub a at /tmp/e9p_wcEG4T:1 in block <unit> at /tmp/e9p_wcEG4T:1» | ||
awwaiid | so Zoffix and llfourn -- y'all just want me to go to town on random docs like it was a wiki? | ||
m: my $x = Nil; sub a (Int:D) { 'win'.say }; a($x); | 04:04 | ||
camelia | rakudo-moar 2ad739: OUTPUT«Type check failed in binding <anon>; expected Int but got Any in sub a at /tmp/mLaGBxALXg:1 in block <unit> at /tmp/mLaGBxALXg:1» | ||
llfourn | awwaiid: well like it was a very official wiki :D | ||
Zoffix | awwaiid, sure | ||
awwaiid | do you still want a PR to bounce through for easy undo? I'd still do a PR for anything I thought would be large or conversation-worthy | 04:05 | |
llfourn | awwaiid: I'd say just go ahead. If you are re-structuring files you might want to PR | 04:06 | |
awwaiid | k | ||
is there a fast way to verify the pod markup? | 04:07 | ||
llfourn | awwaiid: not that I know of | 04:08 | |
awwaiid | cool. well I'll keep tinkering :) | 04:09 | |
tomorrow. cya & | |||
Zoffix | awwaiid, I tend to do PRs only for things I want people to discuss (usually something large that has an impact on something) | ||
llfourn | I mean you could just Pod::To::HTML an individual page and see if you can get the CSS...cua | ||
cya* | |||
Zoffix | awwaiid, the bot announces the commits, so I think it's pretty noticable what people are committing | ||
bye | |||
awwaiid | [from the beyond: awesomeness, thanks!] | 04:10 | |
tadzik | I just got an email with an invite to, effectivly, job speed dating | 04:17 | |
I have to admit, it is kind of cool, spam or not :D | |||
04:17
tardisx joined
|
|||
Zoffix | heh | 04:20 | |
04:30
mr_ron left
04:52
BenGoldberg left
04:56
vendethiel joined
04:57
AlexDaniel left
|
|||
Zoffix | Haw! Browsing through pages of stock to find a bg pic for a p6 site and I come across this! :) depositphotos.com/6454910/stock-ill...ector.html | 05:03 | |
Hm. It actually sucks when placed on the page :P | 05:05 | ||
05:19
vendethiel left
|
|||
TimToady | m: say Iterable === Any | 05:25 | |
camelia | rakudo-moar 2ad739: OUTPUT«Method 'iterator' must be implemented by Iterable because it is required by a role in any compose_method_table at gen/moar/m-Metamodel.nqp:2661 in any apply at gen/moar/m-Metamodel.nqp:2671 in any compose at gen/moar/m-Metamodel.nqp:2807 in…» | ||
05:32
CIAvash joined
|
|||
dalek | href="https://modules.perl6.org/mojo-app:">modules.perl6.org/mojo-app: e4c1974 | (Zoffix Znet)++ | / (14 files): Rudimentary working app |
05:33 | |
05:47
Khisanth left,
Actualeyes left
|
|||
TimToady | m: sub foo(Iterable $s) {...}; say &foo.signature | 05:49 | |
camelia | rakudo-moar 2ad739: OUTPUT«Method 'iterator' must be implemented by Iterable because it is required by a role in any compose_method_table at gen/moar/m-Metamodel.nqp:2661 in any apply at gen/moar/m-Metamodel.nqp:2671 in any compose at gen/moar/m-Metamodel.nqp:2807 in…» | ||
05:49
colomon left
|
|||
TimToady | that tries to call Iterable.WHICH, and that forces role punning, which doesn't work here | 05:50 | |
m: say Iterable.foo | |||
camelia | rakudo-moar 2ad739: OUTPUT«Method 'iterator' must be implemented by Iterable because it is required by a role in any compose_method_table at gen/moar/m-Metamodel.nqp:2661 in any apply at gen/moar/m-Metamodel.nqp:2671 in any compose at gen/moar/m-Metamodel.nqp:2807 in…» | ||
TimToady | doesn't matter which method you call on it | ||
05:50
Khisanth joined
06:03
pyrimidi_ joined
06:05
khw left,
Actualeyes joined,
pyrimidine left
06:11
colomon joined
06:14
rindolf joined
|
|||
zengargoyle | Pod variable $=data not yet implemented. Sorry. :( | 06:17 | |
TimToady | role punning bug filed as #126606 | 06:24 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126606 | ||
06:25
tardisx left
06:28
darutoko joined
06:36
finanalyst left
06:47
softmoth_ left
06:50
xfix joined,
nightfrog left
06:52
nightfrog joined
06:58
[Sno] left
06:59
rindolf left
07:02
visiting joined,
visiting left
|
|||
dalek | p: 94d5575 | usev6++ | src/HLL/sprintf.nqp: Handle NaN and Inf in sprintf (directives e, f, g) |
07:07 | |
p: 052389b | FROGGS++ | src/HLL/sprintf.nqp: Merge pull request #253 from usev6/sprintf_nanorinf Handle NaN and Inf in sprintf (directives e, f, g) |
|||
kudo/nom: 8517d87 | TimToady++ | src/ (4 files): return typecheck now passes both Nil and Failure Failure now considers itself to be derived from Nil, and the return typecheck bypass now is based on Nil. The upshot is that Nil is now regarded as the simplest form of failure, and people will be less tempted to use type objects to indicate failure. |
07:08 | ||
ast: b6cbc45 | TimToady++ | / (2 files): baggy assignment fails slightly differently now |
|||
07:11
ggoebel2 left
07:13
skids left
|
|||
dalek | kudo/nom: f6d7f4d | TimToady++ | src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java: fix jvm too for Nil return |
07:13 | |
07:15
ggoebel joined
07:17
CIAvash left,
[Sno] joined
07:29
Actualeyes left
|
|||
dalek | ast: 6f6e494 | TimToady++ | S06-advanced/return.t: ensure return typecheck passes Nil and Failure |
07:29 | |
07:30
geraud left
07:37
eone joined
07:43
_mg_ joined
|
|||
[Tux] | lizmat, T::C broken in master. No time right now to dig | 07:49 | |
07:50
Actualeyes joined
|
|||
[Tux] | t/20_file is a short test (before the whole t/* starts barfing) | 07:50 | |
07:51
ely-se joined
07:53
_mg_ left
07:56
matt_ left
07:59
matt_ joined,
matt_ is now known as Guest67892
08:02
_mg_ joined
08:03
abraxxa joined
08:13
espadrine joined
08:19
azawawi joined
|
|||
azawawi | hi #perl6 | 08:19 | |
so now officially Perl 6 is broken again on my windows box | 08:20 | ||
08:20
zakharyas joined
|
|||
azawawi | panda github.com/tadzik/panda/issues/245 | 08:20 | |
zef github.com/ugexe/zef/issues/71 | 08:21 | ||
azawawi sighs | |||
moritz | azawawi: is there travis support for windows? | 08:24 | |
azawawi | moritz: github.com/travis-ci/travis-ci/issues/216 | 08:25 | |
moritz: a while back adamk got me accounts on microsoft vm servers (au) | 08:26 | ||
moritz: to setup testing for padre on different platforms | |||
moritz: as the ticket says it is licensing issues... though i think things should be different with windows 10 going forward | 08:28 | ||
moritz: given that windows 10 is being handed as free to all windows 7 and 8 users | |||
azawawi starts working on github.com/perl6/DBIish/issues/22 | |||
08:29
pippo joined
|
|||
pippo | o/ #perl6 | 08:29 | |
azawawi | pippo: hi :) | 08:32 | |
[Sno] | moritz: sure I can document the options in Configure.pl | 08:49 | |
think I did it for rakudo and/or star ^^ | |||
lizmat | good *, #perl6! | 08:51 | |
pippo | lizmat: o/ | 08:53 | |
[Sno] | moin lizmat :) | 08:54 | |
08:54
Actualeyes left
09:00
RabidGravy joined
|
|||
lizmat | [Sno] pippo o/ | 09:02 | |
Hotkeys | is there a simple way to turn a list into an array | 09:03 | |
moritz | Hotkeys: yes! | 09:04 | |
Hotkeys: assignment to an array variable, and calling .Array | |||
Hotkeys | woo | ||
oh | |||
I tried .array | |||
that'll do it | |||
moritz | m: say (1, 2, 3).Array.perl | ||
camelia | rakudo-moar f6d7f4: OUTPUT«[1, 2, 3]» | ||
Hotkeys | capitalization is fun | ||
moritz | m: say [(1, 2, 3)].perl | ||
camelia | rakudo-moar f6d7f4: OUTPUT«[1, 2, 3]» | ||
moritz | also works | ||
Hotkeys | fancy | 09:05 | |
moritz | (my @ = (1, 2, 3)).perl | ||
m: (my @ = (1, 2, 3)).perl | |||
camelia | ( no output ) | ||
JimmyZ | m: @(1,2,3).perl | ||
camelia | ( no output ) | ||
JimmyZ | m: say @(1,2,3).perl | ||
camelia | rakudo-moar f6d7f4: OUTPUT«(1, 2, 3)» | ||
moritz | JimmyZ: precedence | ||
erm, no | |||
I think @(...) is actually .list | |||
anyway, there's more than one way to do it :-) | 09:06 | ||
JimmyZ | m: say @([1,2,3]).perl | ||
camelia | rakudo-moar f6d7f4: OUTPUT«[1, 2, 3]» | ||
JimmyZ | m: say @((1,2,3)).perl | ||
camelia | rakudo-moar f6d7f4: OUTPUT«(1, 2, 3)» | ||
Hotkeys | I'll probably stick to .Array unless one of the others is more idiomatic | 09:08 | |
lizmat | m: dd [1,2,3] # most ideomatic ? | 09:09 | |
camelia | rakudo-moar f6d7f4: OUTPUT«Array $var = $[1, 2, 3]» | ||
moritz | it depends, really | 09:10 | |
if it's a long expression, I tend to favor method calls | 09:11 | ||
for literals, I prefer [...] | |||
09:11
dakkar joined
09:15
domidumont joined,
xfix left
|
|||
lizmat | [Tux]: one commit to T::C, but needs more work | 09:21 | |
09:24
kjs_ joined
09:35
woolfy joined
|
|||
woolfy | Question from Perl6 on Facebook: "Is there a plan to include perl 6 in beaker notebook? I heard its grammars are great. " ( beakernotebook.com/ ) I never ever heard of BeakerNotebook. Anybody? | 09:36 | |
pink_mist | err, I think that's a question better suited for the beakernotebook people 0_o | 09:37 | |
or so it seems to me at least | |||
lizmat | [Tux] T::C clean again, but with hacks :-( | 09:40 | |
[Tux] | lizmat++ | ||
canary-coalmine | |||
off to $work | 09:41 | ||
dalek | kudo/nom: c9cb7f4 | lizmat++ | src/core/Str.pm: Fix running with PERL6LIB on JVM Apparently, you cannot nqp::getattr into a native int on the JVM, even if the attribute in question *is* a native int. |
09:44 | |
lizmat | [Tux]: actually, the test showed that the canary has a hidden disease :-) | 09:45 | |
I just gave it a shot of penicillin | |||
but it is not a long term solution :-) | |||
moritz | isn't there a separate nqp::getattr_i for native ints? | ||
lizmat | .tell [Coke] testing on JVM works again | 09:46 | |
yoleaux | lizmat: I'll pass your message to [Coke]. | ||
09:47
eone left
|
|||
lizmat | moritz: I'll try that after I'm done with fitness | 09:47 | |
afk for a few hours& | |||
09:50
abraxxa left,
abraxxa1 joined
10:03
andreoss joined
|
|||
azawawi | moritz: what's the status of DBIish? Is it actively maintained or not? | 10:07 | |
moritz | azawawi: it is | 10:08 | |
azawawi | moritz: it seems to have been written by many authors over the years though since the coding style is not consistent | 10:09 | |
moritz | azawawi: that's correct | ||
azawawi | moritz: with your permissions, im going to start refactoring it :) | 10:10 | |
andreoss | are we going to have a real DBI any time soon? | ||
10:14
dayangkun_ joined
|
|||
andreoss | i've read somewhere that DBI will be implemented in moarvm but cannot find it now | 10:15 | |
moritz | azawawi: what do you want to refactor? | ||
andreoss: the plan was to use the JDBC API as the interface between DBI and the DB backends | |||
andreoss: but that's not a task I'm going to tackle, so I don't know when/if it'll happen | |||
azawawi | moritz: several classes are inside one file, moved to their own files (e.g. mysql) | ||
moritz: mysql -> MySQL | 10:16 | ||
moritz: kebab-case | |||
moritz: add instructions for windows | |||
moritz | azawawi: as long as those classes are rather small, I'd rather keep them in separate files | ||
azawawi: and I'm fine with adding kebab-cased APIs, but please don't break backwards compatbility | 10:17 | ||
azawawi: instructions for windows are fine | |||
s/separate/common/ | |||
10:17
dayangkun left
|
|||
azawawi | moritz: and improve documentation for newbies on different platforms | 10:17 | |
moritz: i will work on my own fork and then submit a PR.... to be safe :) | 10:19 | ||
El_Che | please don't go the python way, where it's stdlib is fairly inconsisting in the naming of methods and functions (capitals, not capitals, etc) | 10:23 | |
timotimo | the stdlib is something that makes people sad | ||
ely-se | I don't want people to be sad. :( | 10:24 | |
arnsholt | Well, with Perl 6 there's not really going to be all that much of a stdlib. Which is probably going to give us other problems instead =) | 10:25 | |
timotimo | it's where code goes to die :) | ||
oh hey arnsholt | |||
azawawi | moritz: which modules are using atm DBIish? | 10:26 | |
JimmyZ | time to rename DBIish to DBI? :P | ||
10:27
CIAvash joined
|
|||
arnsholt | o/ timotimo | 10:27 | |
moritz | azawawi: dunno; some of my scripts (non-modules) use it | 10:28 | |
timotimo | whenever i wanted to do something with databases from perl6, i used DBIish | 10:30 | |
[Sno] | lizmat, moritz - confirming local test that perl6 runs on target :) | 10:34 | |
10:37
Actualeyes joined,
andreoss left
|
|||
timotimo | m: say slurp() ~~ m:i:g/<[sno]>/ | 10:44 | |
camelia | rakudo-moar c9cb7f: OUTPUT«(「s」 「n」 「s」 「o」 「o」 「n」 「n」 「n」 「n」 「s」 「s」 「n」 「n」 「n」 「s」 「o」 「s」 「o」 「n」 「n」 「o」 「s」 「o」 「N」 「s」 「s」 「o」 「n」 「o」 「n」 「s」 「n」…» | ||
timotimo | m: say slurp() ~~ m:i:g:m/<[sno]>/ | ||
camelia | rakudo-moar c9cb7f: OUTPUT«(「s」 「n」 「s」 「o」 「o」 「n」 「n」 「n」 「n」 「s」 「s」 「n」 「n」 「n」 「s」 「o」 「s」 「o」 「n」 「n」 「o」 「s」 「o」 「N」 「s」 「s」 「o」 「n」 「o」 「n」 「s」 「n」…» | ||
timotimo | m: say (slurp() ~~ m:i:g:m/<[sno]>/)>>.Str.join | ||
camelia | rakudo-moar c9cb7f: OUTPUT«snsoonnnnssnnnsosonnosoNssononsnnnonnnsoosnsoosononnonsnsoNsoónsssssosonósnsnnnsnnnsooNoonsóosnonsonnnoossnnnnnsóSosoonnnsooSnSnoónnnonsnssonnnoooosnosssóoonnnnnnsoo» | ||
timotimo | m: say (slurp() ~~ m:i:g:m/<[tux]>/)>>.Str.join | 10:45 | |
camelia | rakudo-moar c9cb7f: OUTPUT«ttúutuuuttúúúutttttuútuúttútttttutúuttttúttúTttutuututt» | ||
timotimo | m: say (slurp() ~~ m:i:g:m/<[coke]>/)>>.Str.join | ||
camelia | rakudo-moar c9cb7f: OUTPUT«CééeoCoecéEeocococoeeoccoceoeooeocoeoccoceococeoeóecceoeceoeóéeeeoooéoecóoeécoeceeoéééocoeeéeóeeooceeoeoooócoeéoeeoocoocecoceeóeooeoo» | ||
pink_mist | snusnu? | 10:48 | |
timotimo | m: say (slurp() ~~ m:i:g:m/<[snu]>/)>>.Str.join | ||
camelia | rakudo-moar c9cb7f: OUTPUT«snsnúnnnussnnnsusnnsNuussúnúúnsnnnunnnssnssnnnnsnusúNsnsussssúsnsnsúnnnsnnnsNnssnunsnnúnssnunnnnsSsnnnsSnSnúnnnnsnssnnnúsnssusunnununnns» | ||
timotimo | m: say (slurp() ~~ m:i:g:m/<[snu]><[snu]>/)>>.Str.join(" ") | ||
camelia | rakudo-moar c9cb7f: OUTPUT«ún us nn Nu ún nn nn nn ún nn ns ún nu nn nn ún us nn» | ||
timotimo | m: say (slurp() ~~ m:i:g:ov:m/<[snu]><[snu]>/)>>.Str.join(" ") | ||
camelia | rakudo-moar c9cb7f: OUTPUT«ún us nn Nu ún nn nn nn ún nn ns ún nu nn nn ún us nn» | ||
10:51
eliasr joined
10:55
azawawi left
10:56
Peter_R joined
|
|||
TEttinger | no no, I swear perl 6 is more legible this time! | 10:58 | |
and then we get say (slurp() ~~ m:i:g:m/<[snu]><[snu]>/)>>.Str.join(" ") | |||
timotimo | m: say (slurp() ~~ m/ :ignorecase :global :ignoremark <[snu]><[snu]> /).map(*.Str).join(" ") | 10:59 | |
camelia | rakudo-moar c9cb7f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/U_YfeQz3drUnrecognized regex modifier :globalat /tmp/U_YfeQz3dr:1------> 3say (slurp() ~~ m/ :ignorecase :7⏏5global :ignoremark <[snu]><[snu]> /).map» | ||
timotimo | m: say (slurp() ~~ m:global:overlap/ :ignorecase :ignoremark <[snu]><[snu]> /).map(*.Str).join(" ") | ||
camelia | rakudo-moar c9cb7f: OUTPUT«ún us nn Nu ún nn nn nn ún nn ns ún nu nn nn ún us nn» | ||
timotimo | better? | ||
TEttinger | well, no, but it's still impressive | 11:00 | |
timotimo | at some point all i can say is "well, it's not python or java" :) | ||
TEttinger | I primarily use clojure and people complain about how many non-alnum glyphs it uses | 11:01 | |
timotimo | oh? | ||
i haven't looked at clojure much, i know it uses ( ) [ ] ! and ? at least, and the -, too | |||
TEttinger | yeah, not perl people, but java/python people | ||
timotimo | though - could in some cases be called "alnum glyph" | ||
or rather "honorary alnum glyph" | 11:02 | ||
TEttinger | yeah, it's a lisp, so you have () surrounding function/macro calls | ||
timotimo | oh, and ' for quote, of course | ||
TEttinger | but clojure also has [] for list-like vector literals, which mostly remove the need for quoted lists | ||
timotimo | i remember that part so far | ||
m-expressions! :P | |||
TEttinger | {} for hash-maps, #{} for hash-sets, #() for anonymous fn shorthand, :keyword-or-something as a special interned string meant to be used as a key in an associative collection (map or set) | 11:03 | |
timotimo | ah, that :foo thing is usually called "a symbol", right? | 11:04 | |
TEttinger | not quite, symbols are things like + | ||
or map | |||
timotimo | oh | ||
TEttinger | they're names of identifiers | ||
usually they need the ' quote to be used | |||
timotimo | OK | ||
TEttinger | < and > notably just mean less than and greater than... except when used for arrow stuff | 11:05 | |
(-> 1 (* 2) (+ 3)) | |||
timotimo | ah? | ||
what kind of thing do you get from that? | |||
TEttinger | is the same as (+ (* 1 2) 3) | ||
-> passes an arg through multiple function bodies | |||
it's a relatively simple macro and perl if it doesn't already have it will as soon as macros are done | 11:06 | ||
timotimo | i don't quite understand why it'd pull the + out in front there | ||
TEttinger | prefix notation, that's a later call | ||
timotimo | oh, huh | 11:07 | |
a full-on shuffle | |||
TEttinger | pretty much | ||
-> helps keep that stuff legible | |||
timotimo | oh, now i get it | ||
11:07
_mg_ left
|
|||
TEttinger | there's a variant that puts the arg at the end instead of the beginning of the argument lists | 11:07 | |
timotimo | you read it kind of like "with a 1, first multiply it by 2, then add 3 to it" | ||
TEttinger | yep! | ||
timotimo | now that makes a whole lot of sense | ||
TEttinger | it's one of the best uses for macros that makes things simpler, changing order to improve clariy | 11:08 | |
clarity | |||
timotimo | m: say 10.&infix:<*>(2).&infix:<+>(3) | ||
camelia | rakudo-moar c9cb7f: OUTPUT«23» | ||
TEttinger | macros often make things more complex | ||
timotimo | basically that :) | ||
TEttinger | yes | ||
perl is amazing at the string stuff | 11:09 | ||
timotimo | even if this isn't a string of characters, but a string of operations :D | ||
TEttinger | yeah, mostly still amazed by how you had u with an accent without typing it up above | ||
timotimo | hah | ||
that's ignoremark at work | 11:10 | ||
any PCRE-using language ought to have that | |||
TEttinger | would it ever make the s with comma underneath? | ||
or c with cedilla? | |||
timotimo | it could, it's just not in the input file | ||
let me see how i type that with neo2 | |||
11:11
rindolf joined
|
|||
timotimo | m: say "çṣ" ~~ m:ignoremark:global/ <[sno]> /; | 11:11 | |
camelia | rakudo-moar c9cb7f: OUTPUT«(「ṣ」)» | ||
timotimo | m: say "çṣ" ~~ m:ignoremark:global/ <[snoc]> /; | ||
camelia | rakudo-moar c9cb7f: OUTPUT«(「ç」 「ṣ」)» | ||
RabidGravy | apparently, DBIish is depended on by "DB::Model::Easy", "Task::Star", "DB::ORM::Quicky", "Slang::SQL", "Lingua::Unihan" | ||
TEttinger | neat | 11:13 | |
11:14
ely-se left
|
|||
timotimo | for reference, this is the source string: | 11:16 | |
m: say slurp | |||
camelia | rakudo-moar c9cb7f: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGallAgus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luíI mo dhiaidh bhí gleanntáin ghlas’ G…» | ||
TEttinger | ohhh | ||
11:18
dayangkun_ left
|
|||
RabidGravy | I think, JSON::Tiny wins in the most depended up module though | 11:21 | |
timotimo | probably | ||
also, JSON::Fast won't ever be able to catch up :P | |||
RabidGravy | I'll do a proper list later, going shopping in a bit | ||
11:24
ely-se joined
11:28
_mg_ joined
11:31
CIAvash left
11:33
RabidGravy left,
CIAvash joined
|
|||
dalek | kudo/nom: 6f8030b | lizmat++ | src/core/Str.pm: Proper fix for JVM breakage, moritz++ |
11:36 | |
jnthn | morning, #perl6 | 11:37 | |
ooh, no messages :) | 11:38 | ||
timotimo | oh hey jnthn | ||
lizmat | jnthn o/ | 11:39 | |
|Tux| | timotimo, any special reason you used my nick in that split, as in: do you have a question? | 11:49 | |
timotimo | sorry, it's just the people who have [ ... ] around their nicknames | 11:50 | |
no disturbance intended | |||
(just because [ ] used to be character classes) | 11:51 | ||
woolfy | jnthn ohey | 11:52 | |
11:53
TEttinger left
|
|||
timotimo | obey jnthn | 11:53 | |
11:53
CIAvash left
11:59
zacts left
|
|||
jnthn | timotimo: Indeed. Now, fix 10 RTs! :P | 11:59 | |
timotimo | since you didn't tell me to fix 10 existing RTs, i'll just write up some useless RTs and fix them as NOTABUG :P | 12:00 | |
jnthn | Which just shows that it doesn't matter what metric you pick for anything, people will find a way to game it. :-) | 12:01 | |
moritz | ah, the funny stories about companies that tried to measure development productivity by number of commits | 12:02 | |
timotimo | "you removed a thousand lines, so you owe us bigtime, buddy!" | ||
12:03
_mg_ left,
zacts joined,
kjs_ left
12:04
xpen left
|
|||
jnthn remembers the time he removed 300,000 lines of C# and 10,000 lines of SQL at one client... Using Perl 6 scripts to do hacky dependency analysis and instrumentation on the code. :) | 12:04 | ||
hm, I wonder if rt.perl.org/Ticket/Display.html?id=122891 is magically fixed by \r\n being a grapheme :) | 12:05 | ||
m: say "a\n" ~~ /^^\s*$$/ | |||
camelia | rakudo-moar 6f8030: OUTPUT«Nil» | ||
jnthn | m: say "a\r\n" ~~ /^^\s*$$/ | ||
camelia | rakudo-moar 6f8030: OUTPUT«Nil» | ||
jnthn | yay :) | ||
For once it fixes something rather than breaks something :P | 12:06 | ||
12:08
Skarsnik joined
|
|||
dalek | ast: db7683e | jnthn++ | S05-metachars/line-anchors.t: Test for RT #122891. |
12:09 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=122891 | ||
12:10
xpen joined
|
|||
jnthn | One more xmas RT falls :) | 12:13 | |
jdv79 | m: Array.new(|[456]).perl.say; Hash.new(|{:baz(456)}).perl.say | 12:14 | |
camelia | rakudo-moar 6f8030: OUTPUT«[456]{}» | ||
jdv79 | that seems inconsistent to m | ||
e | |||
timotimo | very good, now you'll only have to do another ~0.7 RTs today, jnthn ;) | ||
jnthn | I did 2 yesterday ;) | 12:15 | |
timotimo | oh! | ||
oops. we should turn off your internet connection for a day, in that case! | |||
lizmat | that wold leave .4 for today then :-) | ||
*would | |||
jnthn | I'm going to kick rt.perl.org/Ticket/Display.html?id=123154 off the xmas RT list 'cus I fixed it on Moar, then it got re-opened and tagged JVM only | 12:16 | |
moritz | +1 | 12:17 | |
jnthn | If anyone wants a hint where to fix it on JVM, I can provide one. | ||
12:20
sufrostico joined
|
|||
lizmat | jnthn: perhaps add the hint to the ticket ? | 12:21 | |
if not for yourself down the line ? | |||
12:24
_mg_ joined
|
|||
jnthn | lizmat: I'd have to look stuff up to give it :) | 12:25 | |
Though, could do I guess | |||
lizmat | it's sort of fresh in your mind now :-) | 12:26 | |
jnthn noted the Moar commit that fixed it on the ticket | |||
jdv79 | Hash.new((|$h)) # that sort of thing seems wonky | ||
jnthn | jdv79: If you add an extra pair of parens, you're making a Slip | 12:27 | |
jdv79 | i have to in this case | 12:28 | |
becaues of what i mentioned above | |||
maybe someday it'll make sense but to a newbie that does not | |||
jnthn | Right, |{...} passed named args, but the Hash constructor expects a list of pairs | ||
jdv79 | yet the array constructor can take [] or |[] just fine | 12:29 | |
just weird | |||
jnthn | |[] also results in positional arguments | ||
jnthn will be gone for a few hours | 12:30 | ||
jdv79 | more to my point - why doesn't Hash.new(:a(123)) work? | ||
it just feels wrong. probably me. | |||
12:31
xpen left
12:39
ilogger2 joined,
ChanServ sets mode: +v ilogger2
|
|||
jdv79 | but lunch i think. gettin tired fast. & | 12:39 | |
12:40
kaare_ joined
12:42
azawawi joined
|
|||
azawawi | hi | 12:42 | |
moritz: initial refactor github.com/azawawi/DBIish/tree/mas...lib/DBDish without pg | 12:43 | ||
dalek | kudo/nom: d2b4941 | lizmat++ | src/core/ (2 files): PROP/PVALCODE internal subs to Rakudo::Internals |
12:47 | |
12:48
caymanboy joined
|
|||
Zoffix | .tell moritz would it be possible to glance at update-modules.perl6.org that's run by cron? I just wanna check my modifications integrate well with it and will offer any updates to that file once the app is ready | 12:51 | |
yoleaux | Zoffix: I'll pass your message to moritz. | ||
lizmat | $ 6 'dd Hash.new(:42a)' | ||
Hash $var = {:a(42)} | |||
jdv79: ^^^ | |||
$ 6 'dd Hash.new((:666b),:42a)' | 12:52 | ||
Cannot mix positional and nameds in Hash.new | |||
moritz | Zoffix: perlpunks.de/paste/show/5641e88b.3530.2e0 | ||
yoleaux | 12:51Z <Zoffix> moritz: would it be possible to glance at update-modules.perl6.org that's run by cron? I just wanna check my modifications integrate well with it and will offer any updates to that file once the app is ready | ||
Zoffix | Thanks. | ||
grondilu | m: say (foo => "bar") . hash<foo>; # not sure if &[.] is supposed to be reckognized here | 12:55 | |
camelia | rakudo-moar d2b494: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nxMPshQ9O8Missing required term after infixat /tmp/nxMPshQ9O8:1------> 3say (foo => "bar") . hash<foo>7⏏5; # not sure if &[.] is supposed to be  expecting any of: prefix …» | ||
12:55
Celelibi joined
|
|||
grondilu | m: say (foo => "bar") . hash . <foo>; | 12:56 | |
camelia | rakudo-moar d2b494: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YDqHsTOASAUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/YDqHsTOASA:1------> 3say (foo => "bar") . hash . <7⏏5foo>;» | ||
grondilu | m: say (foo => "bar") . hash.<foo>; | ||
camelia | rakudo-moar d2b494: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NeweuHrbkyUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/NeweuHrbky:1------> 3say (foo => "bar") . hash.<7⏏5foo>;» | ||
grondilu | m: say (foo => "bar") . hash .{foo}; | ||
camelia | rakudo-moar d2b494: OUTPUT«5===SORRY!5=== Error while compiling /tmp/w2mt5uyqukUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/w2mt5uyquk:1------> 3say (foo => "bar") . hash .{7⏏5foo};» | ||
grondilu | m: say (foo => "bar") .hash .{foo}; | ||
camelia | rakudo-moar d2b494: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MPhBzGvqhGUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/MPhBzGvqhG:1------> 3say (foo => "bar") .hash .{7⏏5foo};» | ||
grondilu | m: say (foo => "bar") .hash .{"foo"}; | 12:57 | |
camelia | rakudo-moar d2b494: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mJ0BhZwA7lUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/mJ0BhZwA7l:1------> 3say (foo => "bar") .hash .{7⏏5"foo"};» | ||
12:58
s_kilk joined
|
|||
s_kilk | So, I was looking at the source-code for the UUID module, and noticed a cool looking '>>' operator github.com/retupmoca/P6-UUID/blob/...ID.pm6#L26 , but I can't find any reference to it on doc.perl6.org. Am I losing it, or is there no documentation for that op? I'm pretty sure I'm losing it. | 12:59 | |
moritz | s_kilk: it's actually not >>, but >>. | 13:01 | |
s_kilk: and it means "call a method on each of these values, possibly in parallel" | |||
s_kilk | ah, now that's cool | ||
moritz | and yes, might not be documented properly | 13:02 | |
we are still missing lots of docs :( | |||
s_kilk | Ah, ok, that's understandable | ||
is there a deeper source of documentation that might be more raw than doc.perl6.org, but closer to the spec? | |||
probably the spec and test suite itself, really | 13:03 | ||
moritz | right | 13:04 | |
design.perl6.org | |||
s_kilk | thanks | 13:05 | |
And there it is: design.perl6.org/S17.html . thanks for the help. | 13:07 | ||
13:12
s_kilk left
|
|||
dalek | kudo/nom: 7099c76 | lizmat++ | src/core/Map.pm: Streamline Map.new, for better inlining |
13:16 | |
[Coke] | .botsnack | 13:17 | |
yoleaux | 09:46Z <lizmat> [Coke]: testing on JVM works again | ||
:D | |||
synbot6 | om nom nom | ||
[Coke] | (thanks, lizmat++) | ||
lizmat | in the end, it was a 4 char patch | 13:18 | |
13:20
telex joined
|
|||
ely-se | I wish yoleaux and synbot6 both replied to ".botsnack" with ".botsnack" | 13:25 | |
synbot6 | om nom nom | ||
moritz | we've had bot loops in the past. It was no fun :( | 13:29 | |
ely-se | nice :D | ||
13:29
dbrock- joined
|
|||
DrForr | .botcrack | 13:30 | |
13:33
dbrock- left,
dbrock- joined
|
|||
timotimo | lizmat: oh, .STORE will return self? | 13:36 | |
lizmat | yes | ||
timotimo | good catch! | ||
lizmat double checks | 13:37 | ||
timotimo | oh, also, will using the *% for Hash's new method prevent subclassing Hash? because usually you'll have self.bless or nqp::create(self) somewhere | ||
er, as in: method new(*%contents) { return %contents } | |||
13:38
RabidGravy joined
|
|||
lizmat | well, I tried that already, but *% does not have containers for values | 13:38 | |
timotimo | oh! | ||
azawawi | moritz: so even $sth.fetchrow is not needed since we can say $sth.rows[0], right? | ||
timotimo | yeah, that's trouble | ||
RabidGravy | So the top ten most depended on modules are JSON::Tiny, XML, File::Temp, MIME::Base64, URI, File::Find, Digest, LWP::Simple, HTTP::Easy, LibraryMake | 13:39 | |
13:40
andreoss joined,
kjs_ joined
|
|||
moritz | azawawi: depends on what you mean by "not needed" | 13:40 | |
azawawi | moritz: deprecated that is | ||
moritz | azawawi: if you don't want the previous rows to be in memory, the .fetchrow interface might still be easier | ||
azawawi | moritz: one thing, why fetchrow, not fetch-row? :) | ||
moritz | azawawi: I don't think it's deprecated. See my earlier notice about staying backwards compatible | ||
lizmat | I haven't looked at DBIish, but would having the resultset being an Iterable (with an iterator) solve all of the issues ? | 13:41 | |
moritz | azawawi: because it's part of the p5 DBI API emulation | ||
13:41
dbrock- left
|
|||
moritz | azawawi: and if we don't encourage folks to use it, there's no need to rename the methods | 13:41 | |
azawawi | moritz: i see | ||
13:41
dbrock- joined
|
|||
moritz | don't modernize compatiblity APIs :-) | 13:42 | |
13:42
dbrock- left
|
|||
azawawi | moritz: so you want database code written in Perl to be easily moved to Perl 6, right? | 13:42 | |
moritz | azawawi: that, and I don't want to break any current users | ||
unless for *very* good reasons. "This is a shinier name" is not a very good reason. | 13:43 | ||
azawawi | moritz: in that case, why not introduce a compatibility role that does that? | ||
but it is shiny :) | |||
lizmat | m: sub a(*%h) { dd %h; %h }; a(:42a)<a> = 666 # timotimo | ||
camelia | rakudo-moar 7099c7: OUTPUT«Hash $var = {:a(42)}Cannot modify an immutable Int in block <unit> at /tmp/hB3i_iwaHl:1» | ||
azawawi | lizmat: i always say less code is better code until less code is not readable | 13:44 | |
timotimo | right | ||
moritz | azawawi: IMHO we can have three APIs: a low-level API that a driver must provide, the compatiblity methods, and a shiny API (.rows or .all or so being a Seq) | ||
timotimo | so no problem :) | ||
moritz | azawawi: the latter two can be provided by roles | ||
azawawi | moritz: so basically i will make DBI::Easy :) | ||
13:45
dbrock- joined
|
|||
Skarsnik | RabidGravy, interesting. maybe it could be show in a way in modules.perl6.org? I mean when I had to choose a JSON module I was like "wich on is the most commonly used/maintened/not a pet test | 13:45 | |
jdv79 | an old cpan problem | 13:46 | |
moritz | which would show CGI.pm with a huge number | ||
even though one probably doesn't want that module for new code | 13:47 | ||
lizmat | is there a reason we don't have an Any.iterator? method iterator(Any:D:) { self.list.iterator } ? | 13:48 | |
jdv79 | temporal decay mixed in may help | ||
Skarsnik | well for stuff like a JSON module it could be a tag: 'used in perl6 common tools' to mean it used in panda so it's probably well maintened | 13:49 | |
jdv79 | no | ||
azawawi | Skarsnik: that's why we added github stars columns :) | 13:50 | |
jdv79 | a lot of crappy code is used in common tools | ||
ratings help. reviews would help. | |||
moritz | and the module with the most github stars has them because hackernews liked the readme | 13:51 | |
jdv79 | stars are not good. exactly. | ||
moritz | (fwiw I like the readme too :-) | ||
azawawi | any ratings system can be eventually spoofed... look at google search results | 13:52 | |
jdv79 | cpan, the ecosystem, has better solutions | ||
RabidGravy | well if anyone wants to play with the deps then it's gist.github.com/jonathanstowe/f198...3ed0b74b3e | 13:54 | |
azawawi | jdv79: what about knowing whether this module has great documentation or not? | 13:55 | |
jdv79 | namely metacpan's search | ||
sounds like kwalitee | 13:56 | ||
a lot of this has been done | |||
Skarsnik | is there a nice way to export/import the list of module installed? | 13:57 | |
Zoffix | Skarsnik, panda list --installed | 13:58 | |
huh | 13:59 | ||
Skarsnik, panda --installed list | |||
13:59
azawawi left
14:02
zakharyas joined
14:04
kjs_ left
14:05
AlexDaniel joined
|
|||
moritz | awwaiid: it would help to ahve a rating system that doesn't spoof itself :-) | 14:06 | |
Skarsnik | I don't want to be rude, but maybe remove 'pet'/deprecated module? I mean why there is so much JSON module? like JSON::Pretty, JSON::Fast, JSON::Faster? | 14:09 | |
Zoffix | jdv79, was it you who made a blog post somewhere about MetaCPAN for P6? | 14:10 | |
jdv79 | yeah. ive been distracted. hope to get back to it soon. | 14:11 | |
Zoffix | I was wondering what, if any, progress has been made to make it. And is there a contributable repo? | ||
jdv79 | yeah | ||
im at lunch on my phone. later we could talk more:) | |||
Zoffix | Sure | ||
jdv79, I'm almost done with mojo-app powered version of modules.perl6.org; was just wondering how many bells and whistles I should bother adding to it :P | 14:12 | ||
If there's a P6 MetaCPAN in works, I rather contribute to that. | 14:13 | ||
mrf | Skarsnik: The question is who decides which ones get removed? | 14:14 | |
RabidGravy | I'd say it's too early to even think about that | ||
Zoffix | There will be rotting crap always; look at P5's CPAN. just let it happen :) | 14:15 | |
mrf | I agree. | ||
dalek | osystem: 6a89179 | (Kamil Kułaga)++ | META.list: Added Pod::Coverage See: github.com/teodozjan/pod6-coverage |
14:19 | |
Zoffix | \o/ | 14:20 | |
14:21
yqt joined
|
|||
andreoss | m: say || \\(1) | 14:25 | |
camelia | rakudo-moar 7099c7: OUTPUT«\(1)» | ||
andreoss | m: say || || \\(1) | ||
camelia | rakudo-moar 7099c7: OUTPUT«\(1)» | ||
14:27
khw joined
|
|||
andreoss | m: say || \(\(1)) | 14:28 | |
camelia | rakudo-moar 7099c7: OUTPUT«\(1)» | ||
andreoss | m: say ||( || \(\(1))) | ||
camelia | rakudo-moar 7099c7: OUTPUT«\(1)» | ||
14:29
Skarsnik_ joined
|
|||
andreoss | how to resolve Capture of a Capture? | 14:31 | |
m: say ||( (|| \(\(1)))[0] ) | |||
camelia | rakudo-moar 7099c7: OUTPUT«1» | ||
14:33
mr_ron joined,
Skarsnik_ is now known as Skarsnik
|
|||
dalek | href="https://modules.perl6.org/mojo-app:">modules.perl6.org/mojo-app: 48f1839 | (Zoffix Znet)++ | mojo-app/ (9 files): App now passes all but one tests in t/02-app-home-page.t |
14:33 | |
Zoffix | Time to play Fallout 4 \o/ | ||
ugexe | Zoffix: truuuu | 14:35 | |
andreoss | m: \\\1 | ||
camelia | rakudo-moar 7099c7: OUTPUT«Potential difficulties: To refer to a positional match capture, just use $0 (numbering starts at 0). Parenthesize as \(...) if you intended a capture of a single numeric value. at /tmp/U2oaEMlUay:1 ------> 3\\\7⏏051» | ||
andreoss | strange warning | ||
lizmat | it's really for people coming from P5 | 14:38 | |
14:40
virtualsue joined
14:42
dbrock- left,
dbrock- joined
14:43
dbrock- left
|
|||
zengargoyle | i'm still a little afraid of POD6, don't know which parts of the spec are implemented or not. | 14:44 | |
14:45
dbrock- joined
|
|||
zengargoyle | like =data not being there yet but a #| comment magically putting a code snippet in my README.md | 14:45 | |
ugexe | try { run("asdf"); }; say 1 # should this reach `say 1`? | ||
moritz | ugexe: ah, it's because run() returns something that, in sink context, blows up | 14:46 | |
a Proc object, to be exact | 14:47 | ||
we've fixed that for Failure, but seemingly not for Proc | |||
ugexe | yea, but why do i have to catch it to prevent it from escaping the try | ||
moritz | because we haven't yet given it the same treatment as Failure | ||
and we probably should | |||
14:47
xpen joined
|
|||
timotimo | right, try turns on "use fatal" inside the block, and that doesn't seem to work properly with the proc thing | 14:48 | |
ugexe | wouldnt calling method sunk (or the exception inside it) only once fix it? | ||
flussence | should, imo | 14:49 | |
timotimo | ah, so it's just missing a little attribute "already-sunk" | ||
moritz | no | ||
I don't think that try { run("asdf"); }; calls sink inside the try block at all | 14:50 | ||
timotimo | oh, of course, it's not sink that gets called | ||
moritz | because sink context doesn't propagate inwards (yet?) | ||
timotimo | i forget what our code-gen does, exactly | ||
moritz | it's only the outside that's sunk | ||
timotimo | p6fatalize | 14:51 | |
gee, thanks | |||
14:51
rindolf joined
|
|||
moritz | "layer of indirection" | 14:51 | |
ugexe | hmm. the other thing about it that bugs me is that i cant reuse the Proc that the exception gives me. if i try to use the Proc object outside of the catch later (to examine WHY it failed for instance) it will throw the exception again | 14:52 | |
timotimo | ah, that's in the actions | ||
14:52
sprocket joined
14:53
advwp joined
|
|||
timotimo | yeah, if istype($thing, failure) { $thing.sink } | 14:53 | |
so since run doesn't return a failure-istype-ing thing, we don't sink it inside the try | 14:54 | ||
moritz | maybe we need a common role for "blows up in sink context" | ||
let's call it "Titanic" | |||
ugexe | adding a `so` before run makes it work as i would expect | ||
PerlJam | .oO( SinkHole ) |
||
timotimo | sure | ||
flussence | .oO( Cat ) |
||
timotimo | that forces the sinkness to happen earlier | 14:55 | |
not ideal, of course | |||
cats only blow up in the sink if you turn on the water | |||
and then, not all cats do that | 14:57 | ||
flussence | see? perfect metaphor for the average command line program! :) | ||
lizmat | timotimo: indeed, my sister has cats that sit in the sink waiting for you to put on the water tap | 15:01 | |
timotimo | tee hee | 15:03 | |
the kitties i hang out with regularly don't like water too much | |||
huf | dont like it on them, or dont like it at all? most cats like to paw at water at least | 15:06 | |
timotimo | i know they don't like it on them | ||
letting drops fall onto one of them makes him twitch his back a bunch, but he doesn't jump up and run away or anything | 15:07 | ||
ugexe | ahh on windows that try { run "asdf" }; returns exit code -16 instead of -1 | 15:08 | |
zengargoyle | i had a kitten once that would stand outside the shower mewing until you let it in to play in the rain. | ||
timotimo | d'aaw | ||
RabidGravy | our cat was very surprised once when she was young, she jumped in the bath thinking it was empty to find that it wasn't | 15:13 | |
timotimo | there's this image series of a very concerned cat that has discovered his/her owner (well, slave, really) fell into water (a bathtub) and calls for help on their behalf %) | 15:15 | |
15:17
mr-foobar joined
15:19
sprocket left
15:20
isBEKaml joined
|
|||
DrForr | Percy absolutely *loves* her showers. | 15:21 | |
timotimo | oh lord, percy :D | ||
isn't that also the name of a cat in some disney movie? | 15:22 | ||
a dog, actually | 15:23 | ||
DrForr | In this case she's a bird, actually. | ||
timotimo | ah | 15:24 | |
i know birds like to bathe (by necessity, i imagine), but shower is new to me :) | |||
though of course birds get showered every now and then by regular rain | |||
DrForr | Indeed, and with a daddy who can make it rain whenever he wants... | ||
dalek | rl6-roast-data: 7ba7df9 | coke++ | / (9 files): today (automated commit) |
15:29 | |
[Coke] | RT-- | 15:30 | |
anything in the ecosystem that can deal with wget's saved cookie files? | 15:35 | ||
timotimo | not that i know, nah | ||
except if it's a common format that we do have something for already | 15:36 | ||
[Coke] | do any of the http-aware modules do cookies? checking... | 15:37 | |
moritz | I'm pretty sure LWP::UserAgent does | ||
'cause I discussed cookie jar design with sergot++ back in the days | |||
[Coke] | LWP::UserAgent isn't listed on modules | 15:38 | |
dalek | kudo/nom: ed10656 | peschwa++ | src/Perl6/Metamodel/BOOTSTRAP.nqp: Correct caching logic for rwness-sensitive MMD. lizmat++ for pointing out this didn't work right yet. |
||
[Coke] | I assume it's provided by something else? | 15:39 | |
15:39
softmoth_ joined
|
|||
psch | almost feels like it could've been less effort to try and implement rwness-aware multicachefind... o.o | 15:39 | |
but that now actually passes S06-multi/by-trait.t, and roast was clean as well | 15:40 | ||
15:40
skids joined
|
|||
lizmat | psch++ | 15:40 | |
dbrock- | ui sai i ca'e salci | 15:41 | |
i ie tirna na la'a u'i gi'e te cusku | |||
[Coke] | moritz: do you mean HTTP::UserAgent? | 15:42 | |
dbrock- | oops hahahaha sorry | ||
moritz | [Coke]: erm, yes | 15:44 | |
zengargoyle wonders idly if POD =data could be implemented by cloning =code and tweaking things. | |||
Skarsnik | HTTP::Ua has the http::cookies stuff x) | 15:45 | |
lizmat | zengargoyle: that feels like that could work | 15:46 | |
[Coke] | (nice having so much stuff already in the ecosystem, even if it's not everything) | ||
RabidGravy | yeah HTTP::UserAgent does the cookies, no persistent cookie jar as yet. There may also be a bug in the parsing for some content | 15:47 | |
Skarsnik | also $.cookies is not writable ~~ | 15:48 | |
15:50
muraiki joined
|
|||
RabidGravy | Skarsnik, it is now | 15:52 | |
psch | m: multi foo(Int $x is rw) { say "writable" }; multi foo(Int $x) { "readonly" }; say foo(42); foo my $ = 42; | ||
camelia | rakudo-moar ed1065: OUTPUT«readonlywritable» | ||
RabidGravy | like right now | 15:54 | |
Skarsnik | RabidGravy, I mean I did not test yet, but I am not I could write $ua.cookies.set-cookie("stuff"); | ||
[Coke] sees a weird error out of http::useragent: | 15:56 | ||
err code: 0 | |||
error:00000000:lib(0):func(0):reason(0) | |||
[Coke] wonders what tier that's even coming from. | |||
RabidGravy | nope, don't know | ||
[Coke] | I don't see docs on how to use a cookie jar with an http useragent. digging... | 15:57 | |
15:58
mr_ron left
15:59
isBEKaml left
|
|||
RabidGravy | something like $ua.cookies = HTTP::Cookies(file => $somefile, autosave => True); | 15:59 | |
15:59
isBEKaml joined
|
|||
RabidGravy | but dunno if that's well tested | 15:59 | |
16:01
Skarsnik left,
virtualsue left,
Skarsnik joined
|
|||
Skarsnik | weird, only freenode disconnect me w) | 16:04 | |
16:13
isBEKaml left
16:15
Begi1116 joined
16:20
retupmoca joined
|
|||
dalek | rl6-most-wanted: ae81cf8 | RabidGravy++ | most-wanted/modules.md: Add a few more WIPS |
16:21 | |
rl6-most-wanted: d23ea2c | RabidGravy++ | most-wanted/modules.md: Merge branch 'master' of github.com:perl6/perl6-most-wanted |
|||
hoelzro | o/ #perl6 | 16:23 | |
RabidGravy | rarr! | ||
lizmat | m: .say for Mu # is this a bug or not ? | 16:24 | |
camelia | rakudo-moar ed1065: OUTPUT«Method 'map' not found for invocant of class 'Mu' in block <unit> at /tmp/UQmw9mG9aU:1» | ||
lizmat | All tests successful. | ||
Files=1074, Tests=50141, 236 wallclock secs (12.91 usr 3.81 sys + 1442.08 cusr 131.04 csys = 1589.84 CPU) | |||
whee! | |||
16:25
rarara_ joined
16:26
eliasr joined,
sprocket joined
|
|||
Skarsnik | I think what should be added in most wanted feature : something to 'automatize' the creation of Binding modules x) | 16:27 | |
16:27
xpen left
|
|||
dalek | kudo/nom: 326a744 | lizmat++ | src/core/ (7 files): You want an iterator? Just ask for one! There were many places in the code doing a ternary checking for iterability, and if not, do .list.iterator instead of just .iterator . By putting an iterator method in Any, all of these ternaries can go, leading to less code to execute and better inlineability. Of course, since Nil is no longer Any, it needed its own iterator method. |
16:27 | |
timotimo | yeah, there's already a C parser, Skarsnik | ||
get to work! ;) | 16:28 | ||
Skarsnik | I looked at it and was thinking of getting only the part that parse definition of type/struct/enum and function declaration to parse C header. I am pretty sure most of the time you don't even need to resolve macro or other #include. | 16:31 | |
stmuk_ | m: ++4 | 16:32 | |
camelia | rakudo-moar 326a74: OUTPUT«Parameter '$a' expected a writable container, but got Int value in block <unit> at /tmp/G_2TxCC4VA:1» | ||
Skarsnik | but I am not sure how to write/modify the grammar to ignore the other stuff | 16:33 | |
stmuk_ | I'm seeing a similar error to that as a regression with nom since niceville for nativecall | ||
Skarsnik | why Parameter $a? | 16:34 | |
psch | m: say &prefix:<++>.params[0].perl | ||
camelia | rakudo-moar 326a74: OUTPUT«Method 'params' not found for invocant of class 'Sub+{Precedence}' in block <unit> at /tmp/Y0K3QoCDeZ:1» | ||
moritz | say &prefix:<++>.signature.params[0].perl | ||
m: say &prefix:<++>.signature.params[0].perl | |||
camelia | rakudo-moar 326a74: OUTPUT«Mu $» | ||
psch | m: say &prefix:<++>.candidates[1].signature.params[0].perl | ||
camelia | rakudo-moar 326a74: OUTPUT«Mu:U $a is rw» | ||
moritz | that's the proto, I guess | ||
psch++ is ahead of me :-) | 16:35 | ||
psch | stmuk_: the "is rw" dispatch stuff should be fixed since about an hour or two ago, did you pull and rebuild with latest? | ||
(although i don't know what might've cause the regression in Niceville) | |||
stmuk_ | psch: I just built about then but will retry anyway | 16:36 | |
16:41
mr_ron joined
|
|||
psch | m: multi f(Str $a is rw) { }; multi f(Int $b is rw) { }; f "foo" # this is a bit unfortunate, but afaiu should be resolvable when we have multicachefind rw-aware | 16:42 | |
camelia | rakudo-moar 326a74: OUTPUT«Parameter '$b' expected a writable container, but got Str value in block <unit> at /tmp/nDYADmSkif:1» | ||
psch | note it's only the name itself that gets mismatched, not the dispatch | ||
i guess it's also fixable right now, but that'd need quite bit more bookkeeping than i'd like to figure out for a hopefully-not-permanent solution | 16:43 | ||
stmuk_ | yes! it works now | 16:44 | |
I must have just missed the fix | |||
16:45
zakharyas left
|
|||
lizmat | cycling& | 16:45 | |
16:48
^elyse^ joined
16:51
^elyse^ left
|
|||
timotimo | oof. when snarky commit messages are the only piece of happyness you can get out of a piece of coding | 16:52 | |
RabidGravy | :-O | 16:56 | |
I don't suppose there is any existing code that turns 'Foo::Bar' into 'Foo/Bar.pm' ? | 16:57 | ||
timotimo | you have to look it up via the meta's provides section | ||
RabidGravy | nah, not that | ||
literally having a module name in hand (that I may e.g. want to create) and turn it into a pathname | 16:58 | ||
timotimo | choose a shiny path with a password creation algo or something, then put it into the provides section of the meta file :P | 16:59 | |
RabidGravy | :-\ | ||
17:00
yqt left
|
|||
RabidGravy | I'll just go with "($mod-name ~~ s:g/'::'/{ $*SPEC.dir-sep }/ ) ~ '.pm'" then | 17:01 | |
:) | |||
timotimo | what if the operating system you're on doesn't construct paths just by putting the dir-sep in between? | ||
you should split by '::' and catpath the result, i think | |||
17:01
kjs_ joined
|
|||
Skarsnik | why not pm6? | 17:01 | |
RabidGravy | because I prefer .pm | 17:03 | |
timotimo | you're so Rab! | ||
Rabical! | 17:04 | ||
RabidGravy | Rabbitical | ||
catfile though | |||
there should be something which gives you '::' | 17:09 | ||
timotimo | m: say ":" x 2 | ||
camelia | rakudo-moar 326a74: OUTPUT«::» | ||
Skarsnik | $*SPEC.modulesepforlazyrabid | 17:10 | |
zengargoyle | Skarsnik: C::Parser doesn't do #define stuff, have to run it through gcc -E or such, then it might loose some of the #defines which should maybe turn into Enums. | 17:11 | |
zengargoyle thinking out loud | 17:12 | ||
RabidGravy | zengargoyle, I looked at it a while back with regard to doing that | ||
ilmari | .oO( C::PreProcessor )? |
||
timotimo | you really want to do that to yourself? | 17:13 | |
or is that just something that uses gcc or clang for the job? | |||
Skarsnik | zengargoyle, well for extracting type/funct declarationg ignoring Preprocessor stuff could be enought x) | 17:14 | |
RabidGravy | I got a bunch of scripts from extracting those parts from a .h file, but mostly hand made for each project | 17:15 | |
17:16
_mg_ joined
|
|||
timotimo | first i read "a bash script" | 17:16 | |
next thought was "NO WAY" | 17:17 | ||
zengargoyle | might be easier to take some other SWIG-like thing and add a Perl 6 backend?? | 17:18 | |
Skarsnik | probably | ||
zengargoyle not really sure | |||
17:19
dbrock- left
|
|||
Skarsnik | I looked at SWIG but it confuse me, the documentation mentionned writing a small program and SWIG will bind the two language. Not generate the binding file x) | 17:20 | |
timotimo | isn't the thing about swig that it'll generate C code to bind C++ libraries and such? | ||
zengargoyle | h2xs :P | ||
timotimo | haxors | ||
17:21
^elyse^ joined
|
|||
Skarsnik | It supposed to be able to write perl5 binding | 17:21 | |
timotimo | yeah, probably via XS | ||
because what else was there back then | |||
17:22
rarara_ left
|
|||
Skarsnik | yes, but it generate the XS file, so it does seem a strech to assume we can make it generate perl6 nativecall code ~~ | 17:23 | |
zengargoyle | think it'll be a multi-step process though. maybe parse information and dump somehow to give you the chance to rename things, patch up mistakes, etc. then use that to generate bindings. | 17:26 | |
17:26
_mg_ left
|
|||
dalek | p: b3c4902 | (Jens Rehsack)++ | / (3 files): introduce support for sdkroot and sysroot to support cross-builds To allow building for another location rather the final install prefix, regardless whether chroot based builds, cross-compile or canadian cross sdk is the goal, realize the difference between prefix, the sdk-root and the system root for final target. Signed-off-by: Jens Rehsack [email@hidden.address] |
17:35 | |
p: 9f87bb9 | (Jens Rehsack)++ | tools/build/install-jvm-runner.pl: nqp-j: allow experienced user start with other libdir or jars To allow dedicated use of another NQP_DIR or another NQP_JAR list for e.g. cross-compiling NQP. Signed-off-by: Jens Rehsack [email@hidden.address] |
|||
p: d380395 | moritz++ | / (4 files): Merge pull request #252 from rehsack/master introduce support for staging directories during build |
|||
17:35
diana_olhovik joined
17:37
kjs_ left
|
|||
PerlJam | lizmat: re tensorflow, I've been thinking about it, but my problem is always one of time and timing. I wouldn't be unhappy if someone else did it though :) | 17:37 | |
timotimo | hm? using tensorflow for what? | 17:38 | |
PerlJam | timotimo: provide a perl6 interface for it via NativeCall | 17:39 | |
timotimo | oh, right | ||
llfourn | incase anyone hasn't seen it: www.youtube.com/watch?v=kwxHXgiLsFE # that p6 'release talk' from a few weeks ago finally got uploaded | 17:40 | |
17:40
diana_olhovik left
17:41
hartenfels joined
|
|||
timotimo | i just watched it, but i had the feeling i had already seen it | 17:42 | |
17:43
hankache joined
|
|||
dalek | kudo/nom: bb49e08 | (Jens Rehsack)++ | / (3 files): introduce support for sdkroot and sysroot to support cross-builds To allow building for another location rather the final install prefix, regardless whether chroot based builds, cross-compile or canadian cross sdk is the goal, realize the difference between prefix, the sdk-root and the system root for final target. Signed-off-by: Jens Rehsack [email@hidden.address] |
17:44 | |
kudo/nom: 253e633 | (Jens Rehsack)++ | / (4 files): builder: add capability to work with staging directories To allow building for a staging root which might differ from host and tools to be used, be more careful about the PATH's to be used. This will allow cross-compiling rakudo using two builds of nqp: a native one in SDKROOT and a cross-compiled one in SYSROOT. Using host one remains untouched when run without --sysroot or --sdkroot, respectively. Signed-off-by: Jens Rehsack [email@hidden.address] |
|||
kudo/nom: fa50048 | moritz++ | / (5 files): Merge pull request #580 from rehsack/nom add staging dir support for building |
|||
17:45
kjs_ joined
|
|||
dalek | ar: f0def6d | (Jens Rehsack)++ | / (3 files): introduce support for sdkroot and sysroot to support cross-builds To allow building for another location rather the final install prefix, regardless whether chroot based builds, cross-compile or canadian cross sdk is the goal, realize the difference between prefix, the sdk-root and the system root for final target. Signed-off-by: Jens Rehsack [email@hidden.address] |
17:46 | |
ar: dc1ba76 | moritz++ | / (3 files): Merge pull request #53 from rehsack/master add staging dir support for building |
|||
RabidGravy | it's all going off | 17:48 | |
timotimo | all bets are off? | ||
jnthn | So commit! | 17:49 | |
TimToady | Not rollback! | ||
timotimo | gien ne va plus | ||
gitien? | |||
TimToady | m: say Iterable === Any | 17:50 | |
camelia | rakudo-moar 326a74: OUTPUT«Method 'iterator' must be implemented by Iterable because it is required by a role in any compose_method_table at gen/moar/m-Metamodel.nqp:2661 in any apply at gen/moar/m-Metamodel.nqp:2671 in any compose at gen/moar/m-Metamodel.nqp:2807 in…» | ||
TimToady | jnthn: you saw this cute one? ^^^ | ||
jnthn | TimToady: It's long known | ||
timotimo | jnthn: did you see that amazing thing TimToady put in the channel where a bunch of unicode things turn into 7 when say'd? | 17:51 | |
jnthn | TimToady: Clearly, we can't pun a role with missing bits to delegate the method to it | ||
TimToady: We currently have a list of methods that don't cause punning | |||
timotimo: Yeah, ShimmerFairy++ implemented that a while back, no? | |||
Argh | |||
timotimo | er, implemented? | ||
jnthn | Those configure changes have busted the build on Win32 | ||
timotimo | it looked more like a bug | ||
TimToady | I didn't put it on channel, was just responding | 17:52 | |
jnthn | I didn't take it as one | ||
I suspect \d matches them | |||
TimToady | it's just one step more to make ⅐ return a Rat | ||
jnthn | And we know how to numify anything that has a Unicode numeric value | ||
timotimo | oh | ||
i totally misread that! | |||
dalek | : b5919fc | PerlJam++ | misc/perl6advent-2015/ (2 files): [advent] Get started on Advent 2015 |
17:53 | |
jnthn | Well, it could be, but I'd be surprised given our liking of Unicode things ;) | ||
timotimo | i thought the string "foobar" where f, o, b, a and r are weird unicode numbers, turned into "777777" when printed out | ||
PerlJam | BTW, advent season will be here before you know it. Everyone start thinking about what they could write for perl6advent.wordpress.com/ and add their ideas to github.com/perl6/mu/tree/master/mi...dvent-2015 | ||
TimToady | I don't consider it a bug, was just surprised it snuck in without me noticing :) | ||
gee, I wonder what I should write for Christmas... | |||
timotimo | i only considered that a bug because i misread it, etc etc | 17:54 | |
TimToady | maybe just "Here." | ||
17:54
ribasushi joined
|
|||
jnthn | TimToady: github.com/rakudo/rakudo/blob/nom/....nqp#L2938 | 17:54 | |
timotimo | TimToady: i liked the way you ended the tack with something big | ||
jnthn | That's the exlucded list so far | ||
TimToady: We can keep adding to it, but my "lists of things to remember" nerve is tingling :) | 17:55 | ||
OK, guess I'd better try to unbust the Win32 build :/ | |||
Well, or configure | |||
There's nothing I hate much more than build systems. | |||
Well, there are things, but in software, build systems are pretty argh. | |||
TimToady | m: say Failure.^mro | ||
camelia | rakudo-moar fa5004: OUTPUT«((Failure) Nil (Cool) (Any) (Mu))» | ||
17:56
kjs_ left
|
|||
TimToady | I think we'll just have to live with Nil not having the parens there | 17:56 | |
timotimo | haha | ||
i love the way Nil sticks out there | |||
TimToady | the only alternative is to make it (Nil) everywhere, which I don't want | ||
timotimo | remember when Nil disappeared in lists? would be hilarious if that happened right in there, too | ||
17:57
andreoss left
|
|||
TimToady | m: sub foo (--> Int) { Nil }; say foo # now works more like Failure | 17:57 | |
camelia | rakudo-moar fa5004: OUTPUT«Nil» | ||
TimToady | the attempt to move Nil outside of Any didn't pan out though... | 17:58 | |
well, gotta go to writing group, where they're making me work on PP6, or whatever it ends up being named | 17:59 | ||
17:59
kjs_ joined
|
|||
PerlJam | TimToady++ though ... "making" you? :) | 18:00 | |
jnthn | lol | ||
Patching string concat with File::Spec->catfile caused the breakage | |||
I love how making things better makes them worse :P | |||
moritz | jnthn: sorry, I only tested under linux | 18:02 | |
timotimo | still hoping for the windows servers on travis-ci | ||
they also have mac os servers, but i assume they're not going to give us as much coverage as a windows server would | 18:03 | ||
server/vm/whatever | |||
dalek | : 39f612c | PerlJam++ | misc/perl6advent-2015/topic-brainstorming: [advent] add a small topic brainstorm |
||
p: 517c8f8 | jnthn++ | tools/lib/NQP/Configure.pm: Avoid stupid catfile behavior, fixing Win config. |
|||
jnthn | moritz: No worries. In you/[Sno]++'s defence, it *is* silly that it broke, and I'd not have caught this in code review either. | ||
18:03
lostinfog joined
18:06
kjs_ left
|
|||
jnthn | Darn, importing the same fix to Rakudo's configure.pm didn't unbust things. | 18:06 | |
oh, there's another catfile | 18:07 | ||
dalek | kudo/nom: 409cdbb | jnthn++ | tools/lib/NQP/Configure.pm: Unbust Configure on Windows. |
||
18:08
andreoss joined
|
|||
jnthn | All fixed. | 18:10 | |
[Sno] | jnthn: thanks, that's a weird behavior :/ | 18:14 | |
jnthn | [Sno]: Ain't it just. | 18:15 | |
[Sno]: Anyway, np | |||
18:16
domidumont joined
18:26
abaugher joined
18:33
zengargoylew joined
|
|||
nine | tadzik: ping | 18:35 | |
.tell tadzik github.com/tadzik/File-Find/pull/15 | 18:38 | ||
yoleaux | nine: I'll pass your message to tadzik. | ||
18:39
isBEKaml joined
|
|||
grondilu | how do I compare buffers? | 18:39 | |
m: say Buf.new(1) == Buf.new(1); | |||
camelia | rakudo-moar 409cdb: OUTPUT«True» | ||
grondilu | m: say Buf.new(1, 2) == Buf.new(1, 2); | ||
camelia | rakudo-moar 409cdb: OUTPUT«True» | ||
grondilu | m: say Buf.new(1) == Buf.new(2); | ||
camelia | rakudo-moar 409cdb: OUTPUT«True» | ||
grondilu | m: say Buf.new(1) ~~ Buf.new(2); | 18:40 | |
camelia | rakudo-moar 409cdb: OUTPUT«False» | ||
grondilu | m: say Buf.new(1) ~~ Buf.new(1); | ||
camelia | rakudo-moar 409cdb: OUTPUT«False» | ||
psch | jnthn: i'm guessing the for loop in MVMMultiCache.c:289 is what'd need to learn about rwness..? | ||
hartenfels | grondilu try `eqv` | ||
PerlJam | nine: you know, if dir() had an option to recurse, File::Find could be obsolete :) | ||
psch | oh, unless MVM_multi_cache_add doesn't even keep track of that... | 18:41 | |
hartenfels | m: say Buf.new(1) eqv Buf.new(2), Buf.new(1) eqv Buf.new(1) | ||
camelia | rakudo-moar 409cdb: OUTPUT«FalseTrue» | ||
nine | PerlJam: but File::Find also supports filtering | 18:43 | |
18:43
isBEKaml left
|
|||
nine | as does dir... | 18:44 | |
18:44
Begi1117 joined
|
|||
PerlJam | yep (dunno when that got added, but I noticed it the other day) | 18:44 | |
18:46
andreoss` joined
18:47
Begi1116 left,
andreoss left,
eliasr left
18:49
xfix joined,
_mg_ joined
18:50
CIAvash joined
18:51
kjs_ joined
18:54
andreoss` left
18:57
andreoss joined
18:58
andreoss left
|
|||
psch | well, all those different lookup function in MVMMultiCache.c scare me :P | 18:58 | |
hankache | how do i execute external commands? | ||
18:59
andreoss joined
|
|||
hankache | the equivalent of exec() or system() in Perl 5 | 18:59 | |
grondilu | m: say Buf.new(1) eqv Buf.new(2); | ||
camelia | rakudo-moar 409cdb: OUTPUT«False» | ||
grondilu | m: say Buf.new(1) eqv Buf.new(1); | ||
camelia | rakudo-moar 409cdb: OUTPUT«True» | ||
grondilu | hartenfels: thanks | ||
19:00
sufrostico joined
|
|||
flussence | «Stage parse : 81.476» -- was 89 a few days ago! | 19:00 | |
hartenfels | grondilu: np | ||
psch | hankache: shell or run probably, see doc.perl6.org/routine/shell (and s/shell/run/ respectively) | 19:01 | |
hankache | gracias psch | 19:02 | |
will look into it | |||
jnthn | psch: You'll need to update add and find, and I suggest using a bit flag for "is in a container" | 19:03 | |
psch: Much as we do for definedness | 19:04 | ||
psch | jnthn: how feasible is that for me without any understanding of spesh? assuming i need to take care of MVM_multi_cache_find_spesh as well | 19:05 | |
timotimo | i think that's just a version of that that makes sure to not invoke anything and not fail or anything | ||
jnthn | psch: I don't think it'd need much spesh understanidng. | 19:07 | |
psch | alright, i'll flail my subpar C around a bit then :P | ||
19:08
ribasushi left
|
|||
psch | but i guess that means it also needs to pay attention to the new bit flag | 19:08 | |
jnthn | Sure, you set it in add, and check it in find | 19:09 | |
I *think* there's a spare bit | |||
19:10
andreoss left
|
|||
jnthn | arg_tup[i] = STABLE(arg)->type_cache_id | (IS_CONCRETE(arg) ? 1 : 0); | 19:11 | |
19:12
yqt joined,
ribasushi joined
|
|||
jnthn | Those type cache IDs are 64 bits apart | 19:12 | |
19:12
eliasr joined
|
|||
jnthn | But some bits are used for native types too | 19:13 | |
So that may need tewakery to allow an extra bit | |||
[Sno] | jnthn: btw - would be great to see an example for windows bat files how to use default directories for nqp/perl6 bootstrappath | 19:14 | |
timotimo | "64bits apart"? like, "aligned to a full 64bit"? :P | ||
jnthn | timotimo: uh...64 apart :) | 19:15 | |
[Sno]: I'm not really clueful about batch files, I'm afraid. | 19:16 | ||
jnthn has to google every time he writes one :) | 19:17 | ||
19:18
andreoss joined
|
|||
[Sno] | but you have a big advantage - a running system (even when I do it in a VM, I never know whether I broke it or it has to be done somehow else ^^) | 19:18 | |
jnthn | True :) | 19:23 | |
19:25
_mg_ left
19:31
kjs_ left
|
|||
hankache | why does this work | 19:35 | |
m: my $command = run 'perl6', '-v', :out; print $command.out.slurp-rest; | |||
camelia | rakudo-moar 409cdb: OUTPUT«run is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:1 in sub run at src/RESTRICTED.setting:14 in block <unit> at /tmp/C2liWPd1nC:1» | ||
19:35
softmoth_ left
|
|||
hankache | oops | 19:35 | |
i can't use run here? | |||
moritz | no | 19:36 | |
hankache | ah ok | ||
moritz | (you can scream, though :-) | ||
hankache | so why does this work: my $command = run 'perl6', '-v', :out; print $command.out.slurp-rest; | ||
and not this my $command = run 'perl6 -v', :out; print $command.out.slurp-rest; | |||
pink_mist | because 'perl6 -v' is not a binary on your system, presumably? | 19:37 | |
moritz | hankache: because you're trying to run a binary 'perl6 -v', and that doesn't exist | ||
ugexe | run takes an argument list, not a string | ||
moritz | hankache: you can use shell() though | ||
which takes a single string that a shell will interpret and execute | |||
hankache | ok | ||
19:38
_mg_ joined
|
|||
hankache | so if i use run i need to split the exec and the args | 19:38 | |
moritz | only if you get them from a single string | ||
... in which case you can also use shell instead of run | |||
hankache | i can't control the result with shell | 19:39 | |
that's why i used run | |||
shell automatically outputs the result | 19:40 | ||
jnthn | You can capture the output stream instead. | 19:41 | |
shell('...', :out) or so | |||
hankache | moritz ugexe pink_mist thanks | ||
jnthn will try it | 19:42 | ||
jnthn indeed it works | 19:43 | ||
psch | bits 2 to 6 or so looked free, from a bit of gdb poking | 19:44 | |
and apparently i have it working spesh-less | |||
hankache | ok so any advantages of one overt the other? | ||
over* | |||
skids | hankache: you're less likely to run into security isues if you sanitize the args and use run(). | 19:45 | |
hankache | excellent. thanks skids | 19:46 | |
19:49
^elyse^ left
|
|||
AlexDaniel | what skids said! | 19:53 | |
hankache: though there is not much sanitizing required, since args are passed as is | |||
jnthn | psch: Did you try some native arg multi-dispathces? | 19:55 | |
2-6 may be used in that | |||
19:55
andreoss left
19:56
DrPete_ joined
|
|||
hankache | AlexDaniel but args will be coming from different places so instead of conacatenating theem in a string | 19:56 | |
it's easier to pass them as a list | |||
psch | m: multi f(int $x is rw) { "rwint" }; multi f(Int $x) { "Int" }; multi f(str $x) { "str" }; f 2; f my int $x = 5; # works locally as well | ||
camelia | ( no output ) | ||
AlexDaniel | hankache: yes, and it is more correct :) | ||
psch | oh but eh | ||
i'm not actually checking rwness nor output | 19:57 | ||
jnthn | :) | ||
psch | huh | 19:58 | |
AlexDaniel | hankache: in perl5 though 「system」 will degrade to shell if you pass only one parameter, I'm happy that perl6 does not have such pitfall | ||
hankache | AlexDaniel run will not work wi | 19:59 | |
with one param | |||
AlexDaniel | hankache: by the way, if you have to pipe several commands you can still do that with run. See doc.perl6.org/type/Proc | ||
ugexe | perl6 -e 'run("ls")' | ||
bin Build.pm hooks lib logotype META6.json README.pod t xt | |||
psch | well, what i'm actually seeing locally is that it doesn't dispatch to the rw cand at all, neither for int nor num | 20:00 | |
so uh, mabe i should actually try to figure out what all those bits mean :P | 20:01 | ||
AlexDaniel | ugexe: by the way, it should be noted that 「ls」 output is unparseable | ||
flussence wishes he knew some nice, readable way to define/validate nativecall bitflag thingies in terms of p6 enums | |||
AlexDaniel | ugexe: which is why I dislike such examples… normally you will never see run(‘ls’) (or similar) in real code | 20:02 | |
RabidGravy | flussence, the Audio::Sndfile does that a bit | 20:04 | |
flussence | ooh, thanks. will have a look... | ||
RabidGravy | the file types are bit masked | ||
20:05
mr_ron left
20:08
rindolf left
|
|||
flussence | well that code looks pretty nice and readable, even despite github's highlighting butchering most of the file :) | 20:10 | |
psch | hm, not actually seeing a free bit here | 20:11 | |
one arg_tup came out to 100110111100001, and type_cache_id for another was 111101101000000 | 20:12 | ||
the only zeros in both are 5 to 1 (or 6 to 2, depending if the right most is 1 or 0...) and those are MVM_CALLSITE_ARG_* | |||
(that's still not "i know what this means", but...) | 20:13 | ||
jnthn | psch: Yeah. I think that you can s/64/128/ for the type_cache_id increment, and then << 2 the native type flag (and >> 2 in find) | 20:14 | |
psch: And that frees bit 2 to be your container bit | |||
psch | jnthn: oh, so the highest bit is the one that can be shifted off? | 20:15 | |
jnthn | The << 2 comment refers to the line like: | ||
arg_tup[i] = (arg_type << 1) | 1; | |||
arg_tup[i] = (arg_type << 2) | 1; | |||
That | |||
oops | |||
It's << 1 now, I'm suggesting << 2 | |||
No, 2nd counting from the LSB | 20:16 | ||
20:16
Begi1118 joined,
kjs_ joined
|
|||
psch | jnthn: i'm still stuck on the type_cache_id increment... 6model.c has a + 64 there..? | 20:17 | |
20:17
Begi1117 left
|
|||
jnthn | Right, and a 64 in the atomic increment too | 20:17 | |
Make those both 128 | |||
That just means you get an extra certain-to-be-zero bit | |||
timotimo | .o( might as well turn that into a #define'd constant ) | 20:18 | |
jnthn | Aye | ||
We could also just atomic incr the type cache ID and then shift if by the constant | |||
*shtift it | |||
*shift | |||
heh, good job I'm not writing code with this typing :P | |||
psch | o.o | ||
flussence | oh that's neat, «unit enum Foo» DWIM. | ||
(well, in a kinda pointless way since all the important code comes before the semicolon, but still.) | 20:20 | ||
timotimo | sort of like a =begin end | ||
or =finish or something | |||
flussence | looks like you can hang subs off it like a normal module. That seems like it'll come in useful for that bitfield thing I asked about... | 20:22 | |
20:23
zakharyas joined
|
|||
timotimo | interesting. will they just be inside its .WHO? ... like the enum values themselves? | 20:24 | |
that'd be a bit weird | |||
flussence | m: enum Fruit <apple pear> { our sub tomato {'tomato‽'} }; say Fruit::tomato | 20:25 | |
camelia | rakudo-moar 409cdb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PBdSHRhL5SUnexpected block in infix position (missing statement control word before the expression?)at /tmp/PBdSHRhL5S:1------> 3enum Fruit <apple pear>7⏏5 { our sub tomato {'tomato‽'} }; say Fr…» | ||
flussence | doesn't work like that, though; hm. | 20:26 | |
ugexe | m: my %x; %x<y>.grep(*.so) | ||
camelia | rakudo-moar 409cdb: OUTPUT«Cannot call iterator(Any: ); none of these signatures match: (Any:D $: *%_) in block <unit> at /tmp/t9Y6n14ABm:1» | ||
flussence | m: unit enum Fruit <apple pear>our sub tomato {'tomato‽'}say Fruit::tomato | ||
camelia | rakudo-moar 409cdb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ltq9xeP5w1Bogus statementat /tmp/Ltq9xeP5w1:2------> 3o7⏏5ur sub tomato {'tomato‽'} expecting any of: whitespace» | ||
flussence | m: unit enum Fruit <apple pear>; # missing semicolon our sub tomato {'tomato‽'}say Fruit::tomato | ||
camelia | rakudo-moar 409cdb: OUTPUT«tomato‽» | ||
20:27
softmoth_ joined
|
|||
timotimo | dude | 20:27 | |
that's weird! :) | |||
flussence | though that first error makes it sound like I'm doing something that's not *supposed* to work, so I'm not sure... | ||
20:28
mr_ron joined
|
|||
El_Che | I attended a Python course at work where the instructor was very curious about Perl6. | 20:29 | |
dalek | ast: 5df60df | usev6++ | S32-str/sprintf.t: Expect 'Inf' when 'Inf' is passed to sprintf that's more consistent than 'inf' or 'INF' |
||
jnthn | That's nothing, one of the Python teachers at my work has a Perl 6 commit bit :P | ||
flussence | It seems to work identically whether or not the “unit” keyword is there, so maybe that just gets ignored. | ||
20:30
hankache left
|
|||
ugexe | my %x; %x<y>.grep(*.so) # is this correct in not working anymore? | 20:30 | |
El_Che | jnthn: you win :) | ||
flussence | ah, yeah, that was it. $?PACKAGE never gets set. | 20:31 | |
lizmat | m: my %x; %x<y>.grep(*.so) | ||
camelia | rakudo-moar 409cdb: OUTPUT«Cannot call iterator(Any: ); none of these signatures match: (Any:D $: *%_) in block <unit> at /tmp/4fapro0hIE:1» | ||
ugexe | m: sub foo (:$a) { say $a.grep(*.so) }; foo() | ||
camelia | rakudo-moar 409cdb: OUTPUT«Cannot call iterator(Any: ); none of these signatures match: (Any:D $: *%_) in sub foo at /tmp/JW77TShj2D:1 in block <unit> at /tmp/JW77TShj2D:1» | ||
lizmat | I guess I broke that... | 20:32 | |
20:32
^elyse^ joined
|
|||
lizmat | ah...I know what's wrong | 20:32 | |
[Coke] | m: for 1,2,3,4 -> $x { $x.say } ; # should we make a non-texas variant of the -> ? | ||
camelia | rakudo-moar 409cdb: OUTPUT«1234» | ||
flussence | the subs inside still get namespaced into the enum though, which *is* weird. feels like a bug I probably can't rely on (but would be nice if it stayed) | 20:33 | |
lizmat | ugexe: testing a fix | ||
give me a few mins | |||
ugexe | cool, glad you have an idea | 20:34 | |
lizmat | m: Any.grep: *.so # golfed | ||
camelia | rakudo-moar 409cdb: OUTPUT«Cannot call iterator(Any: ); none of these signatures match: (Any:D $: *%_) in block <unit> at /tmp/pK8PsqkCga:1» | ||
20:34
raoulvdberge joined
|
|||
dalek | kudo/nom: 2940709 | lizmat++ | src/core/Any.pm: Type objects also want iterators, ugexe++ for spotting |
20:35 | |
20:35
^elyse^ left
20:36
rindolf joined
|
|||
hartenfels | Hey y'all, I made a module: github.com/hartenfels/Text-Markdown-Discount, can someone tell me how to add it to the module ecosystem? | 20:37 | |
RabidGravy | make a PR adding your projects META.info to the github.com/perl6/ecosystem/blob/ma.../META.list | 20:39 | |
hartenfels | RabidGravy: Alright, thank you. | 20:40 | |
20:45
telex left
20:46
telex joined
|
|||
dalek | osystem: 0c79e57 | (Carsten Hartenfels)++ | META.list: Add Text::Markdown::Discount to ecosystem See github.com/hartenfels/Text-Markdown-Discount |
20:48 | |
osystem: 5ac2a71 | RabidGravy++ | META.list: Merge pull request #90 from hartenfels/master Add Text::Markdown::Discount to ecosystem |
|||
20:50
lostinfog left
|
|||
[Coke] | hartenfels++ | 20:50 | |
20:51
CIAvash left
20:53
rindolf left
|
|||
PerlJam | hartenfels++ indeed. | 20:53 | |
20:55
_mg_ left,
kaare_ left
|
|||
hoelzro | hartenfels++ | 20:55 | |
20:56
domidumont left
|
|||
PerlJam | I wonder if at some point we'll get something like: use Clib :stdio; to get at fopen and friends. | 20:56 | |
zacts | hello #perl6 | ||
PerlJam | greetings zacts | 20:57 | |
zacts | :-) | ||
I figured out how to make an ASCII / UTF-8 Camelia >%< | |||
I think it's cool, I might make a t-shirt of it for myself | 20:58 | ||
with the >%< zoomed in | |||
and like #!/usr/bin/env perl6 or something | |||
with a 'say ">%<";' or something like that? but yeah | 20:59 | ||
just an idea | |||
timotimo | zacts: the official utf-8 camelia is »ö« | 21:00 | |
zacts | ah yeah? I didn't realize that... that's cooler | ||
=) | |||
hartenfels | Oh that was quick. And thanks for the postincrements. | 21:01 | |
zacts | I see it in the topic now though | ||
21:03
zakharyas left
|
|||
hartenfels | PerlJam I'd definitely use those instead of rolling my own stdio bindings. Might be worth to start a Clib.pm6. | 21:05 | |
RabidGravy | or stick it in the existing POSIX | 21:06 | |
21:06
ifim joined
|
|||
timotimo | i think it's been in camelia.txt before it was in the topic | 21:06 | |
hartenfels: do you know "markdeep"? is there any sense in wanting that as a perl6 module? i think its only(?) implementation is javascript :| | |||
retupmoca | github.com/cygx/p6-native-libc/ looks like it might have fopen stuff already | 21:07 | |
PerlJam | sweet | ||
21:07
abaugher left,
jantore joined
21:08
abaugher joined,
softmoth_ left
|
|||
hartenfels | timotimo I don't know it, but I guess it'd be glueable if you called into nodejs or some other JavaScript library. | 21:09 | |
retupmoca Oh neat, I'll just depend on that instead. | 21:10 | ||
PerlJam | though it doesn't look like Native::LibC groups exports ... it would be nice to tag things with :stdio :stdlib :string etc. IMHO rather than have to list off all the imports explicitly | 21:11 | |
hartenfels | Also seems to be lacking fdopen, but both those should be an easy enough patch. | 21:13 | |
21:16
cygx joined
|
|||
PerlJam | is the construct "is native(Str)" guaranteed future proof? (i.e., it won't blow up because of an undefined value at some point) | 21:16 | |
cygx | PerlJam: there already is Native::LibC in the ecosystem | ||
hartenfels | It's documented that way in the NativeCall documentation at least. | ||
cygx | PerlJam: I'm busy right now with Other Things, but if you have a feature request... | 21:17 | |
21:17
habamax joined
|
|||
PerlJam | cygx: I think hartenfels has one (maybe in the shape of a PR) | 21:17 | |
21:18
mr_ron left
|
|||
PerlJam | cygx++ btw. | 21:18 | |
hartenfels | Soonish at least. | ||
If I can think of a sane way to write a test for fdopen | 21:19 | ||
PerlJam | hartenfels: Care to write an advent post? perl6advent.wordpress.com/ (not right now, but around advent season) We could always use more articles. | 21:22 | |
cygx: you too re advent article. | 21:23 | ||
hartenfels | PerlJam: Sure, but about what? Most of what I learned was of previous advent calendar posts. | ||
PerlJam | hartenfels: your experience writing Text::Markdown::Discount. What it's like to use Perl 6 from your perspective. etc. | 21:24 | |
hartenfels: anything you think is neat about Perl 6 | |||
cygx | note that fdopen is from POSIX, not the C standard lib | ||
so I'd put it into a Native::POSIX module (but still populate the Native::LibC namespace so it gets mapped into libc::, which is how I organize things right now) | 21:25 | ||
21:25
habamax left
|
|||
cygx | PerlJam: I can probably come up with something to write about | 21:25 | |
hartenfels | PerlJam: Perl6 is neat all around, aside from its startup time. But I'll see if I can think of something interesting to write. | 21:26 | |
PerlJam | cool | ||
moritz idly wonders if CVE-2015-5307 means he should reboot master.p6c.org | 21:27 | ||
hartenfels | cygx: Oh, I wasn't aware of that. Then I should probably take that out of my module for the sake of portability anyway. | ||
cygx | hartenfels: it's available on Windows as _fdopen, so it is reasonably portable | 21:28 | |
it's just not part of the C language standard lib | 21:29 | ||
21:29
espadrine joined,
sufrostico left
|
|||
cygx | the standard lib doesn't do file descriptors | 21:29 | |
hartenfels | That's what I checked too, so I just assumed it was standard. While the function on its own might work, I don't wanna depend on a Native::POSIX that might not install on systems the module would otherwise work on. | 21:30 | |
21:36
TEttinger joined
21:39
njmurphy joined,
softmoth_ joined
21:40
espadrine_ joined,
espadrine left
|
|||
grondilu | m: my @a; @a[3..4] = rand xx 2; say @a | 21:44 | |
camelia | rakudo-moar 294070: OUTPUT«[]» | ||
grondilu | m: my @a; @a[3,4] = rand xx 2; say @a | ||
camelia | rakudo-moar 294070: OUTPUT«[(Any) (Any) (Any) 0.434058554835957 0.714992255868652]» | ||
dalek | ast: dca1fae | usev6++ | S04-declarations/my.t: Add test for RT #87034 |
||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...l?id=87034 | ||
grondilu | m: say (my @)[3..4] = rand xx 2; | ||
camelia | rakudo-moar 294070: OUTPUT«()» | ||
grondilu | m: say (my @)[3..4] = 1, 2 | ||
camelia | rakudo-moar 294070: OUTPUT«()» | ||
grondilu | m: say (my @)[3,4] = 1, 2 | 21:45 | |
camelia | rakudo-moar 294070: OUTPUT«(1 2)» | ||
grondilu | looks like a bug | ||
m: say (my @)[my @ = 3..4] = 1, 2 | |||
camelia | rakudo-moar 294070: OUTPUT«(1 2)» | ||
grondilu | shouldn't @array[$range] = @stuff work as expected? | 21:46 | |
awwaiid | whaaa | 21:47 | |
psch | grondilu: that's RT #124316 | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=124316 | ||
awwaiid | what is this (my @) thing? | 21:48 | |
psch | currently works with explicit flattening, not sure what the desired behavior is | ||
uh, well not in that anon case from the looks of it | |||
21:48
n0xff joined
|
|||
psch | m: my @a; my @b; @a[0,1] = 42,43; say @a.perl; @b[^2] = 42,43; say @b.perl; @b[| ^2] = 12,13; say @b.perl # the case in the ticket | 21:49 | |
camelia | rakudo-moar 294070: OUTPUT«[42, 43][][12, 13]» | ||
grondilu | awwaiid: anonymous array | ||
awwaiid | link to doc? | ||
psch | m: say (my @)[| (3..4)] = 1, 2 # just precedence... | ||
camelia | rakudo-moar 294070: OUTPUT«(1 2)» | ||
psch | although arguably that should be (Any), (Any), (Any), 1, 2..? | 21:50 | |
grondilu | awwaiid: in S02: "Bare sigils may be used as placeholders for anonymous variables:" | ||
synbot6 | Link: design.perl6.org/S02.html# | ||
awwaiid | thanks! | ||
grondilu | btw anonymous variables were introduced relatively recently if I'm not mistaken, yet it's a feature I can't live without :) | 21:51 | |
21:51
mr_ron joined
|
|||
Hotkeys | in what situations would one use anonymous variables | 21:52 | |
awwaiid | are there non one-liner use cases? | ||
ya, what Hotkeys said | |||
psch | i liked the toggle sub someone brought up recently | 21:53 | |
or whatever it was called | |||
arnsholt | When you're implementing an interface method, and your implementation only needs some of the arguments | ||
skids | m: sub a { state $++; }; a().say; a().say | ||
camelia | rakudo-moar 294070: OUTPUT«01» | ||
arnsholt | That's a use for anonymous variables | ||
Or deconstructing a multiple-element list (a la my ($foo, $bar, $blech)), and you only need a couple of the values | 21:54 | ||
awwaiid | arnsholt: ah, so like _ in ruby and others, but kinda typed? | ||
arnsholt | $ is exactly like _ | ||
But with types, since Perl 6 has types, yeah | |||
21:55
[Sno] joined
|
|||
gfldex | m: my ($,$foo) = 1,2; say $foo; | 21:55 | |
camelia | rakudo-moar 294070: OUTPUT«2» | ||
Hotkeys | is there a prettier way to do inline for stuff with multiple variables (I know you can use $_ when you only need one | ||
ie | |||
er | |||
eg | |||
-> $k, $v { say "$k: $v" } for %stuff.kv | |||
like python has the pretty 'foo(x) for k, v in stuff.kv' | 21:56 | ||
gfldex | m: sub oi {$ ^= 1}; say oi, oi; # i don't know what this does, but it seams not to work correctly | ||
Hotkeys | (that's some pseudo stuff) | ||
21:56
spider-mario joined
|
|||
camelia | rakudo-moar 294070: OUTPUT«Memory allocation failed; could not allocate 78848 bytes» | 21:56 | |
Hotkeys | I know you can also do 'for %stuff.kv -> $k, $v { say "$k: $v" }" | 21:57 | |
psch | m: my $a ^= 1, 2; say $a.perl # gfldex | ||
camelia | rakudo-moar 294070: OUTPUT«WARNINGS:Useless use of constant integer 2 in sink context (line 1)one(one(), 1)» | ||
Hotkeys | which is nicer | ||
psch | gfldex: i think you're misunderstanding ^= | ||
AlexDaniel | Hotkeys: $^var1 $^var2 perhaps? | ||
grondilu | you can also use %stuff.pairs | ||
Hotkeys | oh | ||
psch | but yes, the overflow should probably get fixed... :l | ||
Hotkeys | can you do that @ AlexDaniel | ||
retupmoca | m: my %h = (a => 1, b => 2); for %h.kv { say "$^k: $^v" } | 21:58 | |
camelia | rakudo-moar 294070: OUTPUT«a: 1b: 2» | ||
Hotkeys | grondilu: that was only an example | ||
oh fancy | |||
AlexDaniel | Hotkeys: yeah, I love it | ||
grondilu | m: my %h = (a => 1, b => 2); for %h { say .key, ": ", .value } | 21:59 | |
camelia | rakudo-moar 294070: OUTPUT«a: 1b: 2» | ||
skids | It's recursively building a Junction of and Junction of... | ||
AlexDaniel | Hotkeys: though I mostly use it in subs | ||
Hotkeys | grondilu: I didn't mean for hashes specifically :P | ||
I meant just like | |||
gfldex | psch: that is very likely, but should that fail the way it does? | ||
Hotkeys | multiple variables in situations where one would use $_ | ||
grondilu | Hotkeys: oh yeah, my bad | ||
Hotkeys | for one variable | ||
psch | gfldex: the issue is what skids++ says. i don't know if we can know that you don't want to recursively build something until it's too late | ||
AlexDaniel | Hotkeys: yeah, that's pretty much what $^var thingies do | ||
grondilu | yeah self declared variables are the way to go then | 22:00 | |
Hotkeys | perl6 gets mad when I used placeholders in the repl | ||
but only sometimes | |||
skids | m: sub oi {$ +^= 1}; say oi, oi; # maybe what was originally intended | ||
camelia | rakudo-moar 294070: OUTPUT«10» | ||
Hotkeys | like | 22:01 | |
m: my %h = (a => 1, b => 2); say "$^k: $^v" for %h.kv | |||
camelia | rakudo-moar 294070: OUTPUT«5===SORRY!5=== Error while compiling /tmp/l0SlDJaq4YCannot use placeholder parameter $^k in the mainlineat /tmp/l0SlDJaq4Y:1------> 3my %h = (a => 1, b => 2); say "$^k7⏏5: $^v" for %h.kv» | ||
psch | Hotkeys: placeholders are effectively parameters that add themselves to the signature | ||
Hotkeys | am I stuck with proper for blocks | ||
psch | Hotkeys: the mainline doesn't have a signature | ||
Hotkeys | for that kind of thing | ||
jdv79 wonders what "we can do better than cpan" means. | 22:02 | ||
retupmoca | m: my %h = (a => 1, b => 2); { say "$^k: $^v" } for %h.kv; # you can do it this way - it just needs to be a block | ||
camelia | rakudo-moar 294070: OUTPUT«a: 1b: 2» | ||
jdv79 | TimToady: ^ | ||
Hotkeys | i guess | ||
rip | 22:03 | ||
lizmat | jdv79: I think this is more about the cpan client (installation), then about PAUSE / CPAN / MetaCPAN | 22:04 | |
22:04
skids left
|
|||
grondilu | retupmoca: I'm a bit surprised this work. Shouldn't there be () after the block? | 22:06 | |
m: { say "$^a" } for <hello bye> | 22:07 | ||
camelia | rakudo-moar 294070: OUTPUT«hellobye» | ||
grondilu | The block is automatically executed. | ||
retupmoca | no, because adding () would try to call the block before the 'for' ever got to see it | 22:08 | |
grondilu | oh yeah | ||
psch | m: { sub { say "$^a" }($_) } for <hello bye> | ||
camelia | rakudo-moar 294070: OUTPUT«hellobye» | ||
retupmoca | actually in this case it might try to call the block with 0 arguments for each iteration | ||
psch | m: sub { say "$^a" }($_) for <hello bye> # superstituous block even | 22:09 | |
camelia | rakudo-moar 294070: OUTPUT«hellobye» | ||
retupmoca | right, what psch showed | ||
psch | m: { say "$^a" }($_) for <hello bye> # superstituous sub | 22:10 | |
camelia | rakudo-moar 294070: OUTPUT«hellobye» | ||
psch | and if you add to that that $^a acts a signature builder it makes sense to work without the parens | ||
if you add parens without $_ inside you get a "too few arguments" | |||
m: { say "$^a" }() for <hello bye> # as here | 22:11 | ||
camelia | rakudo-moar 294070: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in block at /tmp/EdWBb7q51z:1 in block <unit> at /tmp/EdWBb7q51z:1» | ||
22:21
espadrine joined,
espadrine_ left
22:22
xfix left
|
|||
mrf | .tell ugexe I am going to push these tests to a branch in my fork for you to look at. They are currently failing but I can't for the life of me work out why: github.com/ungrim97/Perl6-Grammar-...e/refactor | 22:22 | |
yoleaux | mrf: I'll pass your message to ugexe. | ||
22:22
zengargoylew left
22:27
llfourn joined
|
|||
dalek | c: 71f2532 | VZ++ | doc/Language/syntax.pod: Fix examples showing underscores in numbers It was somewhat confusing to claim that `1_000_000` and `10_00_00` evaluate to the same number, make sure that all numbers have the same number of zeroes, even if they have different numbers of underscores. |
22:28 | |
c: 5a6575e | RabidGravy++ | doc/Language/syntax.pod: Merge pull request #192 from vadz/patch-1 Fix examples showing underscores in numbers |
|||
Skarsnik | _ in number? it's weird lol | 22:29 | |
RabidGravy | he | ||
llfourn | I just watched the p6 announce vid. It was great :D | 22:30 | |
Larry menetioned a list of things that are definitely not going to be in 6.christmas made by jnthn. Anyone got a link? | 22:31 | ||
psch | llfourn: gist.github.com/jnthn/040f4502899d39b2cbb4 | 22:32 | |
llfourn | psch: cheers :) | ||
22:33
tardisx joined
22:39
ifim left
22:40
Begi1119 joined
22:42
Begi1118 left
22:46
muraiki left
22:49
Begi1119 left,
gfldex joined
22:54
yqt left,
kjs__ joined
22:55
kjs_ left,
kjs__ is now known as kjs_
22:56
tardisx left,
tardisx joined
|
|||
grondilu | m: multi infix:<*>(Real $k, $v where [&&] map { $_ ~~ Real }, @$v) { [ $k X* @$v ] }; say pi * [1, 2]; | 22:58 | |
camelia | rakudo-moar 294070: OUTPUT«[3.14159265358979 6.28318530717959]» | ||
grondilu | m: multi infix:<*>(Real $k, $v where [&&] map { $_ ~~ Real }, @$v) { [ $k X* $v ] }; say pi * [1, 2]; | ||
^unexpected infinite recursion | |||
camelia | rakudo-moar 294070: OUTPUT«(timeout)» | 22:59 | |
23:05
kid51 joined
|
|||
timotimo | someone said "anonymous variables are a recent addition"; that's only the syntax for @[...] and %{...} i believe | 23:07 | |
grondilu | I did say it. I think it's no more than a year or two. | 23:13 | |
(so "recent" was very relative) | 23:14 | ||
ugexe | mrf: my guess would be the use of | vs ||. `||` represents what the spec as written in the rfc wants | 23:18 | |
yoleaux | 22:22Z <mrf> ugexe: I am going to push these tests to a branch in my fork for you to look at. They are currently failing but I can't for the life of me work out why: github.com/ungrim97/Perl6-Grammar-...e/refactor | ||
dalek | kudo/nom: 4422d81 | lizmat++ | src/core/ (10 files): Don't use a !=:= b, but !(a =:= b) Because it's at least 25x faster. Either this, or we may want to prime the grammar for !=:= (because they are used a lot in iterators, and iterators imply hot paths, generally). Not directly noticeable speedup in spectest, but some iterator rich apps may notice improved performance. |
23:19 | |
lizmat | good night, #perl6! | ||
Skarsnik | should the vm/compilater do it if it's faster? x) | 23:20 | |
ugexe | mrf: otherwise you can end up with obs tokens and whatnot that technically match longer, but are expected to match as a last resort if nothing else matches | 23:22 | |
23:22
spider-mario left,
perlawhirl joined
|
|||
perlawhirl | is anybody home? | 23:25 | |
gfldex | m: say 'hi perlawhirl!'; | 23:26 | |
camelia | rakudo-moar 294070: OUTPUT«hi perlawhirl!» | ||
zengargoyle | sorta here | ||
llfourn | m: say "I'm always here"; | ||
camelia | rakudo-moar 294070: OUTPUT«I'm always here» | 23:27 | |
perlawhirl | hi... i'm trying to work out if i'm able to pass a new rule to a grammar | ||
zengargoyle | just precompiled panda which shaved ~1.5s off `panda list` for ~2x speedup | ||
perlawhirl | so i have the TOP rule... and tokens... can i override the TOP with a new rule made up of tokens that are defined in the grammar, and use that when i call .parse | ||
llfourn | perlawhirl: do you mean can you chose to start with a different rule other than TOP? | 23:28 | |
zengargoyle | wonder why there's not a rakudobrew or panda --precompile flag | ||
ugexe | because precompile was taken out | ||
23:28
rindolf joined
|
|||
grondilu | precompiling panda must be made manually? | 23:29 | |
perlawhirl | kind of... except the only rule in the grammar is TOP. say i want to re-order the tokens, can i make a new rule and pass that to the grammar? | ||
grondilu | I mean doesn't it do it itself each time we ./rebootstrap or something? | ||
perlawhirl | eg. my rule thingy { <token2> <token1> }; MyGrammar.parse($string, rule => thingy); | 23:30 | |
something like that. | |||
llfourn | perlawhirl: you can just make a role { rule my-rule { ... } } | ||
zengargoyle | was there a reason behind taking out precompiling? (i think i remember whn it did) | ||
llfourn | perlawhirl: and then MyGrrammer.new does MyRole | ||
zengargoyle | perlawhirl: yes, there's an option to .parse to specify a rule to start with. | ||
llfourn | zengargoyle: though perlawhirl wants to use a specific rule object made at runtime | 23:31 | |
perlawhirl | zengargoyle: I know you can have multiple rules defined in the grammar, and tell it which one to use... but what if i want to define another rule outside of the grammar | ||
llfourn: i'll look into this role business | |||
zengargoyle | doc.perl6.org/type/Grammar#___top | 23:32 | |
llfourn | perlawhirl: you can actually MyGrammar.^add_method('thingy',my rule thingy { ... }) # I think | ||
but applying a role to an instance is better practice | 23:33 | ||
zengargoyle | can't you just access it as Grammar::rule | ||
a Grammar is just a fancy class and a rule is just a fancy method | |||
23:34
softmoth_ left,
softmoth_ joined
|
|||
llfourn | zengargoyle: but you have to still call it on the class to get all the sub-regexes to work | 23:34 | |
s/class/grammar/ | |||
zengargoyle | and/or subclass it or maybe add a role. not sure, haven't tried. | ||
perlawhirl | hmm, that sounds like it should work too... will play around a bit more | 23:35 | |
zengargoyle | well, guess it does depend on what's in the rule, if it's only things like <ws> <alpha> etc. that are already defined outside of the grammar... | ||
llfourn | m: grammar G { }; role R { }; say G.new does R | ||
camelia | rakudo-moar 4422d8: OUTPUT«G+{R}.new» | ||
llfourn | perlawhirl: something like that :) | 23:36 | |
zengargoyle at least that's what i'd try. :P | |||
llfourn | zengargoyle: it kinda breaks encapsulation that way...plus wouldn't the rules have to be 'our'. | 23:37 | |
23:37
mr_ron left
|
|||
zengargoyle | me thinks rule called from outside of grammar might still work... wouldn't rule have closed over any references to other things in the grammar at compile time? | 23:37 | |
perlawhirl | ok... so subparse is kind of what i want... this works: G.subparse($string, :rule<token1>) | ||
<token1> is already defined in G | |||
zengargoyle | ah, yeah, probably our. | 23:38 | |
psch | perlawhirl: what's your use-case, ooc? | ||
perlawhirl | howver, how can i do with multiple tokens, ie. G.subparse($string, :rule<token2><token1>) | ||
zengargoyle | but then methods don't need an our on them. | ||
zengargoyle brain hurts. | |||
llfourn | m: grammar G { token fun { } }; G.^find_method('fun') is probably what you mean zengargoyle? | 23:39 | |
camelia | rakudo-moar 4422d8: OUTPUT«5===SORRY!5===Null regex not allowedat /tmp/86zIr1B6SD:1------> 3grammar G { token fun { 7⏏5} }; G.^find_method('fun') is probably wTwo terms in a rowat /tmp/86zIr1B6SD:1------> 3{ token fun { } }; G.^find_method('fun')7⏏5 …» | ||
llfourn | m: grammar G { token fun { } }; say G.^find_method('fun') # is probably what you mean zengargoyle? | ||
camelia | rakudo-moar 4422d8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WexCJB19C7Null regex not allowedat /tmp/WexCJB19C7:1------> 3grammar G { token fun { 7⏏5} }; say G.^find_method('fun') # is prob» | ||
perlawhirl | psch: just playing atm to learn... but a use-case might be a date parser | ||
zengargoyle | i'm sorta guessing you could also subclass the grammar to take other parameters and pass in your new rule. | ||
llfourn | perlawhirl: you can't do it wit multiple tokens afaik | 23:41 | |
psch | perlawhirl: i'm not seeing it... :) | ||
perlawhirl: the questions as asked are mostly solved with inheritance | |||
perlawhirl: e.g. "can i replace TOP?" -"yes, inherit and replace TOP in the subgrammar" | |||
llfourn | perlawhirl: you have to apply a role with whatever you want and then parse from there | 23:42 | |
psch | similarly, if you want to replace one specific rule you can also override it in the subgrammar | ||
23:43
softmoth_ left
|
|||
psch | if you want to add a new rule, well that only makes sense if the grammar you want to parse it with knows where to try to match it, so you'd probably have to override TOP again | 23:43 | |
zengargoyle | i'm thinking like a Grammar to parse like a reciept but then you start getting recipts with different date formats. | ||
so same grammar but with a different <date>? | |||
perlawhirl | zengargoyle: yes, another good example use-case. ALL receipts have <item> <cost> <date> and <total>... but in a different order | 23:44 | |
llfourn | zengargoyle: if you want to keep the old format as a possibility you can use a multi which could match either | ||
zengargoyle also not sure of 'why not ust subclass' | |||
23:44
ddrown joined
|
|||
psch | m: grammar A { token TOP { <a> }; token a { a } }; grammar B is A { token a { aa } }; say A.parse("a"); say A.parse("aa"); say B.parse("aa") # like this... | 23:44 | |
camelia | rakudo-moar 4422d8: OUTPUT«「a」 a => 「a」(Any)「aa」 a => 「aa」» | ||
psch | note the (Any), which is A failing to parse "aa" | 23:45 | |
perlawhirl | yes... I have seen (Any) plenty of times while playing with grammars :) | ||
zengargoyle | perlawhirl: btw, have you tried playing with Grammar::Tracer? | 23:46 | |
23:46
kjs_ left
|
|||
perlawhirl | zengargoyle: nope... will check it out | 23:47 | |
sprocket | on the subject of grammars, i’ve just started writing my first one and had popped in here to ask if anyone had a good, recent example of one i might refer to :) | ||
zengargoyle | it's a part of Grammar::Debugger i think. | ||
JSON::Tiny | |||
ADT had an interesting Grammar/Actions | 23:48 | ||
sprocket | thanks! :) | 23:49 | |
zengargoyle | probably any module that hase Parse in it's name :) | ||
23:50
skids joined
23:55
mr_ron joined
|