»ö« 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:06
cognominal left
00:07
AndyDee left,
AndyDee joined
00:08
llfourn joined
00:12
tokuhirom_ joined
00:13
SuzieQueue left
00:14
llfourn left
00:17
tokuhirom_ left
00:21
iv left,
iv joined
|
|||
dalek | kudo-star-daily: eedd1b6 | coke++ | log/ (8 files): today (automated commit) |
00:22 | |
rl6-roast-data: 309c546 | coke++ | / (9 files): today (automated commit) |
|||
00:25
uucpp left
|
|||
hartenfels | Hey y'all, could someone give me some hints on this failure thing? | 00:26 | |
m: my Int $x = fail 'important error message'; | |||
camelia | ( no output ) | ||
hartenfels | Huh, that's a different output. I get ``Type check failed in assignment to $x; expected Int but got Failure'', without telling me what or where the failure occurred. | 00:27 | |
Am I using that failure wrong or does the message just get eaten? | 00:28 | ||
00:30
Akagi201 joined
|
|||
pink_mist | (note: I won't be able to help you no matter your answer to this question, but if your answer is no, maybe try upgrading) are you on the latest git commit? | 00:30 | |
hartenfels | pink_mist Upgrading right now, gonna try it again. | 00:33 | |
00:33
Akagi201 left
|
|||
hartenfels | Nope, still the same. | 00:33 | |
00:33
Akagi201 joined
|
|||
hartenfels | m: my Int $x = fail 'important error message'; say $x | 00:33 | |
camelia | ( no output ) | ||
hartenfels | m: say 'something' | 00:35 | |
camelia | rakudo-moar fae01f: OUTPUT«something» | ||
hartenfels | Seems like error output is being eaten entirely? | 00:36 | |
00:38
telex left
00:40
telex joined
00:41
SuzieQueue joined
00:42
Hor|zon joined
00:46
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:47
Hor|zon left
00:51
[Sno] joined
|
|||
hartenfels | Okay, I guess the REPL made the output different. | 00:54 | |
So my question again: | |||
m: sub s { fail 'important error message' }; my $x = s; say $x; | |||
camelia | rakudo-moar fae01f: OUTPUT«important error message in sub s at /tmp/Ary_QWBF0l:1 in block <unit> at /tmp/Ary_QWBF0l:1Actually thrown at: in block <unit> at /tmp/Ary_QWBF0l:1» | ||
hartenfels | sub s { fail 'important error message' }; my Int $x = s; say $x; | ||
m: sub s { fail 'important error message' }; my Int $x = s; say $x; | 00:55 | ||
camelia | rakudo-moar fae01f: OUTPUT«Type check failed in assignment to $x; expected Int but got Failure in block <unit> at /tmp/wR8nS70PqD:1» | ||
hartenfels | Am I using failures wrong, with the Int type check? It seems to eat my error message. | ||
01:04
SHODAN left
01:06
Peter_R left
|
|||
[Coke] | m: say "\c[GREEK QUESTION MARK]" eq "\c[SEMICOLON]" | 01:10 | |
camelia | rakudo-moar fae01f: OUTPUT«True» | ||
01:11
atweiden left
|
|||
[Coke] | m: sub s { fail 'important error message' }; my Int $x = +s; say $x; | 01:12 | |
camelia | rakudo-moar fae01f: OUTPUT«important error message in sub s at /tmp/_6ymSC4C5H:1 in block <unit> at /tmp/_6ymSC4C5H:1Actually thrown at: in block <unit> at /tmp/_6ymSC4C5H:1» | ||
[Coke] | assigning it doesn't count as using it. | ||
01:14
[Sno] left
01:16
tokuhiro_ joined
|
|||
hartenfels | [Coke] Thanks, that works for numbers and such. | 01:18 | |
But I'm hesitant to use types if it means that exceptions get eaten on assignment. | 01:20 | ||
ShimmerFairy | Well, arguably it should tell you what the Failure's message is, (and arguably assigning it to a variable is, in fact, using it :P) | ||
01:20
tokuhiro_ left
|
|||
hartenfels | I guess I might should file a bug report against Rakudo then. | 01:21 | |
And let it be rejected if it's intentional that way. | 01:22 | ||
ShimmerFairy | Maybe it could be solved by printing the Failure's message whenever a Failure pops up in an exception? e.g. q[expected Int but got Failure ("important error message")] as the error message? | ||
hartenfels | It sure would. | ||
And the failure location too. | |||
01:31
yeahnoob joined
01:34
Akagi201 left,
Akagi201 joined
01:39
ribasushi left
01:40
kid51 left
|
|||
hartenfels | Filed a bug for it, thanks for y'all's help. | 01:43 | |
01:43
Hor|zon joined,
ribasushi joined,
SHODAN joined
01:44
ilbot3 left
01:47
ilbot3 joined
01:48
Hor|zon left
01:56
kaare_ joined
02:01
Zoffix joined
02:07
leont left
02:10
llfourn joined
02:11
[Sno] joined
02:13
noganex joined
02:15
noganex_ left
02:16
llfourn left
02:30
tokuhirom_ joined
02:35
tokuhirom_ left
02:40
llfourn joined
02:43
[Sno] left,
et09 joined
|
|||
et09 | hi - i have very loose perl experience but strong experience in a few other languages (haskell/ruby/python/js/etc)... my perl experience boils down to "regexes" and "reading about @ vs $" and "there are a lot of variables that are one character and start with $" | 02:44 | |
where should i start with perl 6 if i want to learn it | |||
02:44
Hor|zon joined
02:49
Hor|zon left
|
|||
llfourn | et09: I'd say just play around with it, seeing as you have a lot of languages under your belt I'd say rosettacode.org/wiki/Rosetta_Code would be a great place to start | 02:54 | |
compare the Perl 6 examples with what you are used to :) | 02:55 | ||
also if you find one that doesn't work anymore -- tell us about it :) | 02:56 | ||
02:58
tokuhiro_ joined
|
|||
dalek | c: e711b93 | (Ben Noordhuis)++ | doc/Language/syntax.pod: Fix typos in syntax documentation. |
03:00 | |
c: 07c82ec | (Ben Noordhuis)++ | doc/Language/syntax.pod: Remove blob literal section. Blob literals are described in S02 but the section in syntax.pod uses the wrong syntax and blob literals don't appear to be implemented in Rakudo or tested for in Roast. Avoid confusion, remove the section. |
|||
c: 8eb6d9d | LLFourn++ | doc/Language/syntax.pod: Merge pull request #170 from bnoordhuis/blob-literals Remove blob literal section. |
|||
tokuhiro_ | Is there a 'sub import' equivalent for perl6? | 03:10 | |
I want to do some DSL-ish work on Perl6 | |||
03:11
AndyDee left
|
|||
hartenfels | tokuhiro_ There's EXPORT: doc.perl6.org/language/modules#EXPORT | 03:12 | |
tokuhiro_ | oh! | ||
Thanks! | 03:13 | ||
03:37
khw left
|
|||
[Coke] | m: 756 X/ ( gather for (1,2,3,4,6).combinations(3) { take [+] |$_ })).grep:{$_.narrow ~~ Int} # perl6, great for solving ken ken puzzles. | 03:41 | |
camelia | rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FBA1V8Kju7Unexpected closing bracketat /tmp/FBA1V8Kju7:1------> 033,4,6).combinations(3) { take [+] |$_ })7⏏5).grep:{$_.narrow ~~ Int} # perl6, great» | ||
[Coke] | m: (756 X/ ( gather for (1,2,3,4,6).combinations(3) { take [+] |$_ })).grep:{$_.narrow ~~ Int} # perl6, great for solving ken ken puzzles. | ||
camelia | ( no output ) | ||
[Coke] | m: say (756 X/ ( gather for (1,2,3,4,6).combinations(3) { take [+] |$_ })).grep:{$_.narrow ~~ Int} # perl6, great for solving ken ken puzzles, dammit | ||
camelia | rakudo-moar fae01f: OUTPUT«(126 108 84 84 63)» | ||
03:42
[Sno] joined
03:45
Hor|zon joined
|
|||
[Coke] | (1,2,3,4,6).combinations(3) | 03:46 | |
ww. | |||
llfourn | [Coke]: you can remove the gather/take | 03:47 | |
m: say (756 X/ ( for (1,2,3,4,6).combinations(3) { [+] |$_ })).grep: { .narrow ~~ Int } | |||
camelia | rakudo-moar fae01f: OUTPUT«(126 108 84 84 63)» | ||
[Coke] | ah. without the parens, the gather take was needed. | 03:49 | |
(also missing a sort/unique, but that's fine) | |||
03:50
Hor|zon left,
khw joined
|
|||
[Coke] | (and there's a typo in there, whoops) | 03:57 | |
03:58
xinming_ joined
|
|||
llfourn | m: 9 X/ (1,2,3) | 03:58 | |
camelia | ( no output ) | ||
llfourn | m: say 9 X/ (1,2,3) | 03:59 | |
camelia | rakudo-moar fae01f: OUTPUT«(9 4.5 3)» | ||
llfourn | m: say (9 X/ (1,2,3)).map: { .narrow } | ||
camelia | rakudo-moar fae01f: OUTPUT«(9 4.5 3)» | ||
llfourn | m: say (9 X/ (1,2,3)).map: { .WHAT,.narrow } | 04:00 | |
camelia | rakudo-moar fae01f: OUTPUT«(((Rat) 9) ((Rat) 4.5) ((Rat) 3))» | ||
llfourn | m: say (9 X/ (1,2,3)).map: { .WHAT,.narrow.WHAT } | ||
camelia | rakudo-moar fae01f: OUTPUT«(((Rat) (Int)) ((Rat) (Rat)) ((Rat) (Int)))» | ||
04:00
BenGoldberg left
04:01
tokuhirom_ joined
|
|||
llfourn is beggining to understand | 04:01 | ||
04:01
xinming left
04:03
Celelibi left,
Celelibi joined
04:05
tokuhirom_ left
04:15
PsuzeannePsy joined,
Suzeanne joined
04:18
[Sno] left,
SuzieQueue left
04:19
PsuzeannePsy left
04:37
xfix joined
|
|||
et09 | why would you store a sub as a variable in p6 | 04:42 | |
04:42
Akagi201 left
|
|||
llfourn | et09: same reason you might store a function as a variable in JS | 04:42 | |
et09 | gotcha | ||
to emulate OOP ;) | |||
(scratches head) | 04:43 | ||
llfourn | et09: well...maybe. OOP is very flexible in p6 so you can usually get the objects classes to do what you want. | ||
et09: but you could store a sub in a variable and pass it as an argument for later use | 04:44 | ||
et09 | i was just trying to think of a use case...since p6 has actual classes | ||
learnxinyminutes.com/docs/perl6/ reading this, 15% down... looks great | 04:45 | ||
04:45
Elyan joined
04:46
Hor|zon joined
|
|||
llfourn | et09: yeah I mean callbacks are just useful. Often you don't use subs but blocks {} or pointy blocks -> {}. | 04:47 | |
et09 | i see | 04:48 | |
llfourn | m: my $filter = { $_ %% 2 }; grep $filter,^20; | ||
camelia | ( no output ) | ||
et09 | are they like lambdas? | ||
llfourn | m: my $filter = { $_ %% 2 }; say grep $filter,^20; | ||
camelia | rakudo-moar fae01f: OUTPUT«(0 2 4 6 8 10 12 14 16 18)» | ||
llfourn | et09: yes | ||
et09 | $_ is like $@ in zsh? | ||
or $1? | 04:49 | ||
llfourn | good question | ||
m: say { 'a block' } | |||
camelia | rakudo-moar fae01f: OUTPUT«-> ;; $_? is raw { #`(Block|70668824) ... }» | ||
et09 | uhh | ||
llfourn | so a block is just a bit of code with one argument which is $_ | ||
et09 | ohh. | ||
llfourn | in perl5 it was a bit different | 04:50 | |
et09 | and that grep thing...a range ? | ||
llfourn | m: 0..20 ~~ ^20 | ||
camelia | ( no output ) | ||
llfourn | m: say 0..20 ~~ ^20 | 04:51 | |
camelia | rakudo-moar fae01f: OUTPUT«False» | ||
04:51
Hor|zon left
|
|||
llfourn | m: say 0..5; say ^5 | 04:51 | |
camelia | rakudo-moar fae01f: OUTPUT«0..50..^5» | ||
llfourn | m: say (0..5 ~~ ^5) | ||
camelia | rakudo-moar fae01f: OUTPUT«False» | ||
llfourn | ok I thought that would be true. But yeh 0..5 is the same as ^5. | 04:52 | |
et09 | wow | ||
llfourn | (that might be a bug) | ||
m: say 0..5 ~~ 0..5 | 04:53 | ||
camelia | rakudo-moar fae01f: OUTPUT«True» | ||
et09 | m: my $filter = {$_.uc}; say grep $filter,'A'..'Z'; | ||
camelia | rakudo-moar fae01f: OUTPUT«(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)» | ||
et09 | phew, first guess ! | 04:54 | |
llfourn | et09: yes that works though what you wrote doesn't make much sense :) | ||
m: say map { .uc }, 'a'..'z'; | 04:55 | ||
camelia | rakudo-moar fae01f: OUTPUT«(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)» | ||
et09 | m: my $filter = {ord $_ %% 2 == 0 ?? $_ !! $_.uc}; say grep $filter,'A'..'Z'; | ||
camelia | rakudo-moar fae01f: OUTPUT«Earlier failures: Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5A' (indicated by 7⏏) in block <unit> at /tmp/cSDBJoqur0:1Final error: Cannot call Real(Failure: ); none of these signature…» | ||
llfourn | m: say 'a'.ord | ||
camelia | rakudo-moar fae01f: OUTPUT«97» | ||
et09 | how would grep not add something onto the filter then? | ||
m: my $filter = {$_.ord %% 2 == 0 ?? $_ !! $_.uc}; say grep $filter,'A'..'Z'; | 04:56 | ||
camelia | rakudo-moar fae01f: OUTPUT«(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)» | ||
et09 | what am i doing wrong | ||
04:56
baest_ is now known as baest
|
|||
et09 | want it to alternate every other capitalized | 04:56 | |
llfourn | map { .ord %% 2 ?? $_ !! .uc },'a'..'z'; | ||
m: map { .ord %% 2 ?? $_ !! .uc },'a'..'z'; | |||
camelia | ( no output ) | ||
llfourn | m: say map { .ord %% 2 ?? $_ !! .uc },'a'..'z'; | 04:57 | |
camelia | rakudo-moar fae01f: OUTPUT«(A b C d E f G h I j K l M n O p Q r S t U v W x Y z)» | ||
llfourn | is that what you are trying to do? | ||
et09 | ohh yes, the dot method | ||
man that's cool | |||
m: my $filter = {$_.ord %% 2 == 0 ?? $_ !! $_.uc}; say grep $filter,'a'..'z'; | |||
camelia | rakudo-moar fae01f: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)» | ||
et09 | m: my $filter = {.ord %% 2 == 0 ?? $_ !! .uc}; say grep $filter,'a'..'z'; | ||
camelia | rakudo-moar fae01f: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)» | ||
llfourn | do map :) | 04:58 | |
et09 | m: my $filter = {.ord %% 2 ?? $_ !! .uc}; say grep $filter,'a'..'z'; | ||
camelia | rakudo-moar fae01f: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)» | ||
llfourn | grep is like shell grep | ||
et09 | is that causing the problem? | ||
llfourn | grep is simply a filter | ||
it doesn't change values | |||
et09 | oh... | ||
ohh | |||
hah, ok | |||
llfourn | so your filter returns true for each element so it passes the original value through :\ | ||
et09 | whoops | 04:59 | |
is there equiv to ruby .times do ? | 05:00 | ||
or .each | |||
AlexDaniel | llfourn: ^ means that it is not inclusive | ||
llfourn | each is basically map | ||
et09 | yeah | ||
AlexDaniel | m: say join ' ', 'a'..^'z' | 05:01 | |
camelia | rakudo-moar fae01f: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y» | ||
llfourn | m: for ^5 { .say } | ||
AlexDaniel | llfourn: so it is not a bug | ||
camelia | rakudo-moar fae01f: OUTPUT«01234» | ||
llfourn | AlexDaniel: yep thanks | ||
AlexDaniel: is there an inclusive one? | |||
et09 | m: say 'a' x 3 | ||
camelia | rakudo-moar fae01f: OUTPUT«aaa» | ||
et09 | aha.... | ||
AlexDaniel | m: say 0..4 ~~ ^5 | ||
camelia | rakudo-moar fae01f: OUTPUT«True» | ||
05:01
tokuhirom_ joined
|
|||
AlexDaniel | so it works | 05:02 | |
et09 | m: say map {.ord %% 3 x $_},'a'..z' | ||
camelia | rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GvKHqBFiafTwo terms in a rowat /tmp/GvKHqBFiaf:1------> 3say map {.ord %% 3 x $_},'a'..z7⏏5' expecting any of: infix infix stopper postfix statement …» | ||
llfourn | AlexDaniel: \o/ | ||
et09 | m: say map {$_.ord % 3 x $_},'a'..z' | ||
camelia | rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PYNHuohsScTwo terms in a rowat /tmp/PYNHuohsSc:1------> 3say map {$_.ord % 3 x $_},'a'..z7⏏5' expecting any of: infix infix stopper postfix statement…» | ||
et09 | m: say map {($_.ord % 3) x $_},'a'..z' | ||
camelia | rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/x5q6duNfxiTwo terms in a rowat /tmp/x5q6duNfxi:1------> 3say map {($_.ord % 3) x $_},'a'..z7⏏5' expecting any of: infix infix stopper postfix stateme…» | ||
et09 | hmm | ||
AlexDaniel | llfourn: actually, I'm not sure. Perhaps you have to write 0.. then | ||
or whatever your starting point is | 05:03 | ||
hm | |||
m: say join ' ', ^'z' | |||
camelia | rakudo-moar fae01f: OUTPUT«Earlier failures: Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5z' (indicated by 7⏏) in block <unit> at /tmp/s6OhAJ1gkY:1Final error: Cannot call Real(Failure: ); none of these signature…» | ||
et09 | two terms in a row... | ||
llfourn | AlexDaniel: cool thanks anyways | ||
et09 | m: say map {($_.ord % 3) x $_},'a'..'z' | ||
camelia | rakudo-moar fae01f: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5a' (indicated by 7⏏) in block <unit> at /tmp/pTBdcX23YR:1Actually thrown at: in block <unit> at /tmp/pTBdcX23YR:1» | ||
llfourn | et09: what are you trying to do? | 05:04 | |
et09 | repeat char n times based on mod 3 of ord | ||
AlexDaniel | et09: other way round | ||
et09 | oh | ||
m: say map {$_ x ($_.ord % 3) },'a'..'z' | |||
camelia | rakudo-moar fae01f: OUTPUT«(a bb d ee g hh j kk m nn p qq s tt v ww y zz)» | ||
et09 | m: say map {$_ x ($_.ord % 3 + 1) },'a'..'z' | ||
camelia | rakudo-moar fae01f: OUTPUT«(aa bbb c dd eee f gg hhh i jj kkk l mm nnn o pp qqq r ss ttt u vv www x yy zzz)» | ||
et09 | now we're cooking | 05:05 | |
that's amazing, string multiplication | |||
AlexDaniel | m: say map {$_ x (($_.ord - 1) % 3 + 1) },'a'..'z' | ||
camelia | rakudo-moar fae01f: OUTPUT«(a bb ccc d ee fff g hh iii j kk lll m nn ooo p qq rrr s tt uuu v ww xxx y zz)» | ||
et09 | m: say map {$_ x ($_.ord % 15 + 1) },'a'..'z' | ||
camelia | rakudo-moar fae01f: OUTPUT«(aaaaaaaa bbbbbbbbb cccccccccc ddddddddddd eeeeeeeeeeee fffffffffffff gggggggggggggg hhhhhhhhhhhhhhh i jj kkk llll mmmmm nnnnnn ooooooo pppppppp qqqqqqqqq rrrrrrrrrr sssssssssss tttttttttttt uuuuuuuuuuuuu vvvvvvvvvvvvvv wwwwwwwwwwwwwww x yy zzz)» | ||
05:06
tokuhirom_ left
|
|||
et09 | m: say map {$_ x ($_.ord % 15 + 1) },shuffle 'a'..'z' | 05:06 | |
camelia | rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmIFpMaBoDUndeclared routine: shuffle used at line 1» | ||
et09 | ah it's in a module | ||
05:06
jrm left
|
|||
AlexDaniel | m: say 'a'..'Z' | 05:07 | |
camelia | rakudo-moar fae01f: OUTPUT«"a".."Z"» | ||
AlexDaniel | m: say list('a'..'Z') | ||
camelia | rakudo-moar fae01f: OUTPUT«()» | ||
AlexDaniel | hah | ||
m: say join ' ', 'a'..'Z' | 05:08 | ||
camelia | rakudo-moar fae01f: OUTPUT«» | ||
et09 | ok thanks, good night | ||
05:08
et09 left
|
|||
AlexDaniel | hm, I wonder what's that | 05:08 | |
llfourn | m: say ('a'..'z').pick(26) | ||
camelia | rakudo-moar fae01f: OUTPUT«(v k y s o c q d l h w b p e g a j r u n z t m i f x)» | ||
llfourn | m: say ('a'..'z').pick(*) # better | 05:09 | |
camelia | rakudo-moar fae01f: OUTPUT«(u g x p m w o l v r s n b e q t h k d f j z c i a y)» | ||
AlexDaniel | not that my request was clever in any way, but I wonder if empty list is the right answer :) | 05:10 | |
llfourn | AlexDaniel: what's your request? | 05:11 | |
AlexDaniel | llfourn: give me a list of characters from 'a' to 'Z'! | ||
:)) | |||
llfourn | AlexDaniel: ah... | ||
AlexDaniel | m: say ('Z'..'a').list | 05:12 | |
camelia | rakudo-moar fae01f: OUTPUT«(Z [ \ ] ^ _ ` a)» | ||
AlexDaniel | ah, it's regular ascii stuff then? | ||
llfourn | wut | ||
AlexDaniel | ok | ||
llfourn | AlexDaniel: ahh so because captials come first doh | ||
05:13
leslie_ joined
|
|||
llfourn | m: say 'A'..'z'; | 05:13 | |
camelia | rakudo-moar fae01f: OUTPUT«"A".."z"» | ||
llfourn | :) | ||
AlexDaniel | m: say join ' ', ('a'..'「').list # Ooowwww… | 05:14 | |
05:14
Akagi201 joined
|
|||
camelia | rakudo-moar fae01f: OUTPUT«(timeout)» | 05:15 | |
moritz | m: say join ' ', 'a' ... '「' | 05:16 | |
camelia | rakudo-moar fae01f: OUTPUT«» | ||
AlexDaniel | oh that's my favorite stuff | 05:17 | |
m: say chr -1 | |||
camelia | rakudo-moar fae01f: OUTPUT«chr codepoint cannot be negative in block <unit> at /tmp/RdPRf8slzU:1» | ||
AlexDaniel | m: say chr -0.999 | ||
camelia | rakudo-moar fae01f: OUTPUT«␀» | ||
AlexDaniel | m: say chr -0.99999999999999999999999999999999999 | 05:18 | |
camelia | rakudo-moar fae01f: OUTPUT«chr codepoint cannot be negative in block <unit> at /tmp/eNmQxDkWPX:1» | ||
AlexDaniel | m: say chr -0.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 | ||
camelia | rakudo-moar fae01f: OUTPUT«␀» | ||
AlexDaniel | m: say chr -0.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 | ||
camelia | rakudo-moar fae01f: OUTPUT«chr codepoint cannot be negative in block <unit> at /tmp/SIzzA6BLfm:1» | ||
AlexDaniel | and so on :) | ||
Elyan | hey | 05:19 | |
05:21
leslie_ left
05:29
skids joined
05:35
Suzeanne left
05:39
khw left
05:41
skids left
05:42
hartenfels left
05:44
Elyan left
05:46
[Sno] joined
05:47
Hor|zon joined
05:52
Hor|zon left
05:54
adhoc left
05:56
adhoc joined
|
|||
nine | .tell lizmat I feel like timotimo++ there. Supply.await not waiting for anything feels strange. What it does is more like a for-await, since what it gives you can be used with await. I'd rather call it .Promise, too. | 05:57 | |
yoleaux | nine: I'll pass your message to lizmat. | ||
nine | .tell lizmat or if coercion is not the mechanism we're after (I'm undecided on that), something completely different. Maybe "waiter" ;) | 05:58 | |
yoleaux | nine: I'll pass your message to lizmat. | ||
05:59
aborazmeh left
|
|||
[Tux] | test 50000 37.605 37.493 | 06:03 | |
test-t 50000 38.816 38.703 | |||
06:05
diana_olhovik joined
06:09
rarara_ left
06:11
abraxxa joined
06:17
tokuhirom_ joined
06:22
tokuhirom_ left
06:26
[Sno] left
06:40
Ven joined
06:45
salva left
06:47
xfix left
06:48
Hor|zon joined
06:49
rurban joined
06:51
bjz joined,
Suzeanne joined,
rarara_ joined
06:52
Hor|zon left
06:58
boggard left,
boggard joined
07:00
AlexDaniel left
07:02
domidumont joined,
bjz left
07:06
domidumont left
07:07
domidumont joined
07:14
Suzeanne left
07:15
ely-se joined
07:17
zakharyas joined,
[Sno] joined
07:18
Hor|zon joined
07:19
salva joined
|
|||
timotimo | FWIW, there's already a whole bunch of methods to go between different kinds of our async/multithreaded things | 07:19 | |
of course i can't come up with good examples for naming right now | 07:22 | ||
07:23
g4 joined,
g4 left,
g4 joined
07:27
firstdayonthejob joined
07:28
CIAvash joined
07:37
adu joined
07:40
Ven left,
Ven joined
07:47
Ven left,
Ven joined
07:51
Ven left,
Ven_ joined
08:03
tokuhirom_ joined
08:05
espadrine joined
08:06
bjz joined,
darutoko joined
08:07
tokuhirom_ left
08:10
RabidGravy joined
08:11
Ven_ left
08:12
Ven joined
|
|||
RabidGravy | morning! | 08:13 | |
08:14
Ven left,
Ven_ joined
08:16
Ven_ left,
Ven joined,
azawawi joined,
zakharyas left
|
|||
azawawi | hi #perl6 | 08:19 | |
is there an 'assert' keyword in Perl 6? | |||
FROGGS_ | no | 08:20 | |
08:20
adu left
|
|||
moritz | it's an infix called "or die" :-) | 08:20 | |
azawawi | github.com/azawawi/perl6-selenium-...les/ex01.t # First test :) | 08:21 | |
FROGGS_ | ohh, nice | 08:22 | |
08:22
pmurias joined
|
|||
azawawi | automated headless website testing in Perl 6 :) | 08:22 | |
08:23
rindolf joined
|
|||
FROGGS_ | m: my @a = 1,2,3; my @b; @b.push: @a,; dd @b | 08:24 | |
camelia | rakudo-moar fae01f: OUTPUT«Array @b = [[1, 2, 3],]» | ||
FROGGS_ | m: my @a = 1,2,3; my @b; @b.push: @a; dd @b | ||
camelia | rakudo-moar fae01f: OUTPUT«Array @b = [[1, 2, 3],]» | ||
08:25
dakkar joined
|
|||
FROGGS_ | m: my @a = 1,2,3; my @b; @b.append: @a,; dd @b | 08:25 | |
camelia | rakudo-moar fae01f: OUTPUT«Array @b = [1, 2, 3]» | ||
FROGGS_ | m: my @a = 1,2,3; my @b; @b.append: @a; dd @b | ||
camelia | rakudo-moar fae01f: OUTPUT«Array @b = [1, 2, 3]» | ||
timotimo | i'm surprised that doesn't die; doesn't google automatically redirect you to https nowadays? | 08:26 | |
azawawi | timotimo: you mean ex01.t ? | ||
timotimo | yeah | 08:27 | |
08:27
Ven left
|
|||
azawawi | well it didnt on my linux box :) | 08:28 | |
RabidGravy | azawawi, nice one | ||
azawawi | i will write also more ui tests for "doc.perl6.org" :) | 08:29 | |
that way we will have less regressions when changing the website functionality | 08:30 | ||
08:31
Ven joined
|
|||
FROGGS_ | azawawi++ | 08:31 | |
that's awesome | |||
azawawi | btw travis CI comes with phantomjs preinstalled | 08:32 | |
so we can use that to our advantage | |||
08:33
Ven left
|
|||
timotimo | quite neat! | 08:33 | |
08:33
Ven joined
|
|||
azawawi | docs.travis-ci.com/user/gui-and-hea...-PhantomJS | 08:33 | |
timotimo | actually doing something web-app-like in the future sounds more and more like a possibility :) | 08:34 | |
azawawi | timotimo: yup | ||
timotimo: you do the server part | |||
timotimo: i will test it :) | |||
now i have a problem with documentation | 08:36 | ||
i need =(begin|end) markdown | |||
timotimo | i'll still need an idea first :P | ||
08:37
Ven left,
Ven joined
|
|||
Ven | m: class A { my $!x; method a { sleep 5; $!x = 10; method a { $!x } } }; given A.new { say .a; say .a; } | 08:38 | |
camelia | rakudo-moar fae01f: OUTPUT«Use of uninitialized value of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in any throw at src/Perl6/World.nqp:36175===SORRY!5=== Error while compiling /tmp/_3PCraXlvfCannot use ! t…» | ||
Ven | m: class A { my $!x; method a { method a { $!x }; sleep 5; $!x = 10; } }; given A.new { say .a; say .a; } | ||
camelia | rakudo-moar fae01f: OUTPUT«Use of uninitialized value of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in any throw at src/Perl6/World.nqp:36175===SORRY!5=== Error while compiling /tmp/XGh9rYkt95Cannot use ! t…» | ||
Ven | weblog.jamisbuck.org/2015/10/17/dynamic-def.html is really fun :P | 08:39 | |
08:40
lsm-desktop left
|
|||
dalek | ast: f50149e | FROGGS++ | S02-types/flattening.t: test method push/append for RT #126172 |
08:40 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126172 | ||
ely-se | Ven: absolutely awful | 08:42 | |
Ven | ely-se: you mean amazing | ||
ruby needs more metaprogramming facilities | |||
ely-se | No, it needs fewer. And more immutability. | ||
08:42
spider-mario joined
|
|||
Ven | you wouldn't know, you don't write ruby :P | 08:43 | |
ely-se | Mutable classes are a horrible horrible idea. | ||
rurban | :) | ||
but that's the whole point of metaclasses | 08:44 | ||
to change many classes at once | |||
Ven | `class A < [Hash, Array].sample; end;` <- amazing | ||
ely-se | awful | ||
Ven | executable class bodies are great – that's why elixir stole that :P | ||
timotimo | "class Awful"? :) | ||
ely-se | one of the few things PHP gets right: no dynamic class manipulation bullshit | 08:45 | |
rurban | it just needs to trigger all the class optimizations | ||
common-lisp did it properly and efficient | |||
Ven | rurban: yeah, MRI took a looong time to get a hierarchical method cache | ||
rurban: good interview, btw | |||
08:46
lsm-desktop joined
|
|||
RabidGravy | aw | 08:47 | |
azawawi, I've just chucked in a PR for NCurse with a new example if you want it :) | 08:48 | ||
rurban | method cache, role/mixin layout, inheritance tree, … | 08:49 | |
08:49
Ven left
08:50
Ven joined
08:53
Ven left,
Ven joined
|
|||
konobi | pmurias: so it's the gen script that would be updated, not the Makefile-JS.in ? | 08:54 | |
yoleaux | 18 Oct 2015 18:38Z <pmurias> konobi: I'll replace the build system for nqp-js with a saner one tommorrow | ||
azawawi | RabidGravy: thanks | 08:59 | |
RabidGravy++ | |||
FROGGS_ | m: /<.ws >/ | ||
camelia | rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eVs29YYnwZNull regex not allowedat /tmp/eVs29YYnwZ:1------> 3/<.ws 7⏏5>/» | ||
FROGGS_ | std: /<.ws >/ | ||
camelia | std 28329a7: OUTPUT«5===SORRY!5===Null pattern not allowed at /tmp/H6BOCqVpwM line 1:------> 3/<.ws 7⏏5>/Parse failedFAILED 00:00 135m» | ||
FROGGS_ | k | ||
konobi | ah | 09:00 | |
must have lost that in a netsplit or something | 09:02 | ||
RabidGravy | azawawi, seemed a shame to have it go to waste :) | ||
konobi | time for sleeping... then to voting! | ||
09:04
tokuhirom_ joined
|
|||
azawawi | RabidGravy: :) | 09:05 | |
09:07
zakharyas joined
09:08
Ven left,
Ven_ joined
09:09
tokuhirom_ left
09:10
Ven_ left
09:11
Ven joined
|
|||
dalek | kudo/nom: 4b1df7b | FROGGS++ | src/Perl6/Grammar.nqp: allow whitestape in ::( "&foo"), RT #126385 |
09:12 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126385 | ||
09:13
bjz left,
ssflying left
|
|||
azawawi | m: sub foo { 1 }; while foo > 1 {} # What's wrong with this one? | 09:13 | |
camelia | rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yQN1S8MWRjPreceding context expects a term, but found infix > insteadat /tmp/yQN1S8MWRj:1------> 3sub foo { 1 }; while foo >7⏏5 1 {} # What's wrong with this one?» | ||
azawawi | m: sub foo { 1 }; while foo() > 1 {} # foo() | 09:14 | |
camelia | ( no output ) | ||
09:14
Ven_ joined,
bjz joined
09:15
Ven left
09:16
Exodist left
|
|||
azawawi | sub foo { 1 }; while foo > 1 {} # is that by design? | 09:16 | |
09:18
Exodist joined
|
|||
timotimo | m: sub foo { 1 }; while foo > 1 { }; say "oh" | 09:18 | |
camelia | rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QtdsJhpyvtPreceding context expects a term, but found infix > insteadat /tmp/QtdsJhpyvt:1------> 3sub foo { 1 }; while foo >7⏏5 1 { }; say "oh"» | ||
dalek | ast: 0478776 | FROGGS++ | S02-names/indirect.t: add tests for indirect names with whitespace |
||
timotimo | m: sub foo { 1 }; while foo() > 1 { }; say "oh" | ||
camelia | rakudo-moar fae01f: OUTPUT«oh» | ||
azawawi | RabidGravy: github.com/azawawi/perl6-ncurses/b...eld.p6#L30 :) | ||
FROGGS_ | m: sub foo { 1 }; say foo > 1 | ||
camelia | rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yegAoSRg6aPreceding context expects a term, but found infix > insteadat /tmp/yegAoSRg6a:1------> 3sub foo { 1 }; say foo >7⏏5 1» | ||
timotimo | well, subs expect to get arguments | 09:19 | |
FROGGS_ | true | ||
timotimo | we don't have parser-altering prototypes like perl5 | ||
RabidGravy | azawawi, oops I was just testing the startup time and forgot to take that out ;-) | ||
azawawi | RabidGravy: no problem. will fix it | ||
timotimo | oh, i didn't see the earlier evaluations there | ||
azawawi | RabidGravy: done | 09:20 | |
09:20
ssflying joined,
abaugher left
|
|||
RabidGravy | yay! | 09:20 | |
azawawi | RabidGravy++ | 09:21 | |
09:21
abaugher joined
09:29
Psyche^_ joined
09:34
Psyche^ left
09:36
yeahnoob left,
zakharyas left
09:37
brrt joined
09:42
TEttinger left
09:45
ShimmerFairy left
09:49
FROGGS__ joined
09:51
zakharyas joined
09:52
ShimmerFairy joined,
FROGGS_ left
09:55
eliasr joined
09:58
zakharyas left
10:05
tokuhirom_ joined
10:09
tokuhirom_ left
10:13
Ven_ left,
Ven joined
10:15
rindolf left
10:21
araujo_ joined
10:23
rindolf joined
10:24
araujo left
10:25
Ven left
|
|||
lizmat | m: dd (-1) ** 4553535345364535345634543534 | 10:27 | |
yoleaux | 05:57Z <nine> lizmat: I feel like timotimo++ there. Supply.await not waiting for anything feels strange. What it does is more like a for-await, since what it gives you can be used with await. I'd rather call it .Promise, too. | ||
camelia | rakudo-moar 4b1df7: OUTPUT«0» | ||
yoleaux | 05:58Z <nine> lizmat: or if coercion is not the mechanism we're after (I'm undecided on that), something completely different. Maybe "waiter" ;) | ||
lizmat | guess I need to backlog :-) | 10:28 | |
10:28
Debolaz left
|
|||
lizmat | seems RT #124798 tests are passing | 10:29 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=124798 | ||
nine | lizmat: is that about the power.t failure we've had for weeks, or is it something different? | 10:30 | |
lizmat | well, one of the todoed tests is passing | ||
at least, for me, on OS X | |||
but here on camelia (linux I assume) it's still failing | 10:31 | ||
nine is building to test on Linux | |||
lizmat | $ 6 'dd (-1) ** 4553535345364535345634543534' | ||
1 | |||
dalek | ast: f2c1417 | lizmat++ | S32-num/power.t: Change dubious test to skip Passes on OS X, fails on other systems |
10:33 | |
nine | power.t passes on Linux with no TODOs passed | 10:34 | |
lizmat | well, the above test passed for me since yesterday | ||
nine | Odd....I'd have never suspected there to be a platform difference in that area | 10:35 | |
lizmat | me neither, but it *is* annoying :-) (well, for me, running many spectests a day) | ||
nine | I guess they already passed for you before yesterday. They've been failing on Linux, which is why they were marked todo again. | 10:36 | |
And yes, having to run spectests again on pristine nom just to compare the list of failing tests is perfect waste of developer time :) | 10:37 | ||
pmurias | konobi: yes | 10:38 | |
10:38
bjz_ joined,
bjz left
|
|||
pmurias | konobi: Makefile-JS.in even has an autogenerated comment on top | 10:39 | |
konobi: it's in the repo as it's generated by an nqp script | |||
10:39
weihan joined
10:40
RabidGravy left
10:43
RabidGravy joined
10:46
pmurias_ joined
|
|||
RabidGravy | leaving a kernel upgrade to 4.2.3 without bouncing probably wasn't a good idea then | 10:47 | |
10:48
cognominal joined
10:49
pmurias left
10:52
Sgeo_ joined
10:54
Sgeo left
10:58
RabidGravy left
11:02
Hor|zon left
11:03
AndyDee joined
|
|||
lizmat wonders if there is something to mention about the Pittsburgh Perl Workshop that hasn't been mentioned before in the Perl 6 Weekly | 11:03 | ||
moritz | double mentions are OK :-) | 11:05 | |
lizmat | yeah, but not in consecutive weeks :-) | 11:06 | |
11:07
kid51 joined
11:09
FROGGS__ left
11:18
Ven joined
11:20
tokuhirom_ joined
11:25
tokuhirom_ left,
ely-se left
11:27
Suzeanne joined
11:38
araujo_ left,
araujo joined
|
|||
dalek | kudo/nom: 42e55ec | lizmat++ | src/Perl6/World.nqp: Make sure use invocant/parameters throw an NYI Since they're not working yet, but were being parsed and set up the internals already. In light of the coming release this week. |
11:41 | |
11:44
kid51 left
11:50
ely-se joined
11:52
][Sno][ joined,
[Sno] left,
][Sno][ is now known as [Sno]
11:55
Hor|zon joined
|
|||
brrt | good * #perl6 | 12:00 | |
rindolf | brrt: hello. | 12:03 | |
brrt: sup? | |||
Woodi | hallo #perl6 :) | 12:04 | |
moritz: about DBIish API... | 12:05 | ||
Ven | \o | 12:06 | |
ely-se | o/ | ||
Woodi | 1) would be nice to remove "drivers" into separate modules with separate "namespace" eg. API::Mysql. and there to have full db api, even versioned: mysql4, mysql5.5 ... 5.7 (if different of course) | 12:07 | |
so users can opt for "raw" access to engine | |||
lizmat | Woodi: have you considered roles ? | 12:08 | |
12:09
pmurias_ is now known as pmurias
|
|||
Woodi | moritz: 2) (as for what you realy asked) I like MS in-memory "datasets" similiar to @rows probably. it allows to do changes and commit at the end | 12:09 | |
lizmat: not. versioning on API version probably needs modules | 12:10 | ||
brrt | hello rindolf, Woodi, Ven, ely-se, lizmat | 12:11 | |
Woodi | I imagine having API::Posix, API::Linux, API::Win32, etc | ||
brrt | rindolf: busy busy busy. small bits of progress on the new jit | 12:12 | |
pmurias | didn't Tim Bunce plan to use JDBC as the internal driver api for the DBI 2.0? | ||
timbunce nods | |||
moritz | Woodi: thanks for the feedback, but that AIP is a bit too high-level for DBIish | ||
Woodi | moritz: ?? which "that" ? | 12:13 | |
lizmat | brrt o/ | ||
Woodi | DBIis could be done on top on raw db api. threaded/evented/supplied versions too | ||
12:14
Ven left
|
|||
rindolf | brrt: ah, nice. | 12:16 | |
brrt | maybe i may want to ask my design question here | 12:17 | |
i need to deal with different-sized-operands | |||
that is usually no problem so long as the operands are both a): unsigned and b): either 8 or 4 bytes wide | |||
moritz | Woodi: allowing changes to in-memory data structures and committing at the end | 12:18 | |
12:18
lea left
|
|||
moritz | that's more the realm of an OR mapper | 12:22 | |
and just because it looks deceptivelly simple to write one in p6 doesn't mean DBIish should mogrify into one | |||
Woodi | moritz: just ideas. depends what "scope" DBIish have. datasets could be done on top of it :) | 12:24 | |
12:25
weihan_ joined
12:26
weihan_ left
|
|||
Woodi | and not 100% ORM. just a noting "this cell changed" somewhere | 12:26 | |
12:26
weihan left,
weihan joined
12:27
weihan left,
weihan joined
|
|||
timotimo | so an ... Objecd Dataset Mapper? | 12:28 | |
Woodi | Plain Array Mapper ;) | ||
[Coke] tries to add www.reddit.com/r/perl6/.rss to feedly's rss reader, but only gets articles that are 6 weeks old+ | |||
timotimo | can't just be a plain array if it's supposed to track what changed | 12:29 | |
Woodi | timotimo: it is mapper part for :) | ||
timotimo | mhm | ||
12:30
weihan left
12:31
weihan joined
12:34
lea joined,
weihan left
|
|||
moritz | [Coke]: maybe www.reddit.com/r/perl6/new/.rss ? | 12:35 | |
12:36
tokuhirom_ joined
12:37
weihan joined,
weihan left
12:38
weihan joined
|
|||
brrt | anyway, the question is basically how to handle mixed operands that aren't unsigned and 4-to-8 bytes | 12:38 | |
i.e. when using a 2-byte operand together with an 8-byte operand, the 2-byte operand (if it lives in a register) still contains 'garbage' data for the upper 6 bytes | 12:39 | ||
now in the case the values are unsigned, the upper 6 bytes should be zeroed'; in case they are not, they should be sign-extended (either zeroed or one'd depending on the upper bit) | 12:40 | ||
12:41
tokuhirom_ left
|
|||
brrt | actually, sign extension is also necessary for 4 byte values | 12:41 | |
my question is basically how explicit or implicit should this be | |||
nine | brrt: sign-extending is equal to zeroing for positive values, isn't it? | ||
brrt | i aye | ||
aye | |||
it's literally 'extending the sign byte' which is zero for positive values | 12:42 | ||
12:43
sufrostico joined
|
|||
Woodi | brrt: you are talking about in-vm things or asm things ? in first case maybe lower-level can handle this ? | 12:44 | |
brrt | asm things | ||
nine | x86 does have an op for that | ||
brrt | i know : movsx and movz for sign- and zero-extension repsectively :-) | 12:45 | |
nine | I guess for API design, a good rule of thumb is: the lower level the more explicit | ||
Woodi | heh | ||
brrt | hmm, i tend to agree | ||
on the other hand, i may have cases in which it is nearly impossible to know ahead-of-time the size of all operands | 12:46 | ||
12:46
weihan left
|
|||
brrt | e.g. when using the value of one computation in another i may not know how big the operand is ahead of time; especially when considering different architectures | 12:47 | |
i.e. i may specify something as sizeof(int) and that should work; but i have no idea of whether an upscaling operation would be necessary | |||
12:47
weihan joined
|
|||
brrt | so, i'm leaning to 'automatic' upscaling of registers | 12:48 | |
now i can do that in two ways as well | |||
a): shotgun style, by hardcoding it into the assembly; b): using specific 'scale' tree nodes that handle the conversion | 12:49 | ||
problem of a); is very simply that it becomes much more cumbersome, not to say impossible, to add in signedness information | 12:50 | ||
12:50
reneeb joined
|
|||
brrt | b): of course can do so very simply, but i have to make some decisions on which things are unsigned and which things are signed | 12:50 | |
i would suppose normal integer arithmetic would be signed, whereas pointer arithmetic is unsigned | 12:51 | ||
what about binary operations (AND/OR/XOR)? | 12:52 | ||
nine | And what about uints? | 12:53 | |
12:53
riatre left
|
|||
[Coke] | moritz: weird. was necessary for feedly, but not for the web browser. ah well. Danke. | 12:53 | |
Woodi | brrt: b) looks simpler ;) | 12:55 | |
brrt | well, we're not dealing with uints much yet nine :-) fortunately | 12:56 | |
woodi: I think so too... i just need to make some decisions on the individual ops | 12:57 | ||
the expr tree has only about 30 or so ops so that is not very difficult | |||
timbunce | For the record, re a DBI for Perl 6, this still applies markmail.org/message/oavyl5l4dlme5dft | 12:58 | |
nine | brrt: but they're on the TODO. So it seems prudent to at least keep them in mind and not make it harder to add them later on. | ||
brrt | my hunch is that binary ops, by default, are unsigned; pointer arithmetic ops too;, arithmetic ops are signed, comparisons are... signed, i guess | 12:59 | |
integer comparisons, that is | |||
nine: agreed. but worst case i simply add a U for every signed operation, e.g. UADD, UMUL, UDIV | |||
12:59
riatre joined
|
|||
Woodi | timotimo: but, but... it is Oracle api ! ;) | 13:00 | |
brrt | carg is.... doesn't really care about it, i think, since the operand sizes will typically match the expected size by the function anyway | ||
Woodi | oops, timbunce | ||
timbunce | Woodi: "insired by" :) | 13:01 | |
*inspired | |||
13:01
riatre left
|
|||
Woodi | "one slide to close"... ;) | 13:02 | |
13:02
CIAvash left
|
|||
timotimo | intel's new motto: there's an op for that | 13:03 | |
timbunce | The key point is that there needs to be a low-level api abstracting the db vendor api's, on which to build a higher level perl6y one. | 13:04 | |
JDBC seems like a good choice, but isn't a key feature. | |||
nine | timbunce: I guess JDBC still usually covers all of the DB's capabilities? | 13:05 | |
timbunce | Also using JDBC gives us an instant test suite. | ||
Yes, all the main stuff and quite a lot of extensions. Though there'll always be a need for vendor-specific extensions. | 13:06 | ||
Also using JDBC gives us an instant body of code and experience to draw on. | |||
Also using JDBC gives us "does it work on Perl 6 on JVM using the real JDBC" as a debugging strategy | 13:07 | ||
etc etc | |||
nine | Also stealing the good parts is the Perl 6 way ;) | 13:08 | |
TimToady | .oO(we *intend* to give it back though) |
13:09 | |
Woodi | do MS hacked/embranced-and-hijacked ODBC ? | 13:10 | |
dalek | ecs: f845815 | lizmat++ | S99-glossary.pod: Add reposession lemma, moritz++ |
13:13 | |
brrt likes the jdbc plan | 13:14 | ||
13:14
azawawi left
|
|||
brrt | MS supports ODBC, but it is barely functional typically | 13:14 | |
masak | slightly off-topic: is there a Perl::Tidy analogue for Python? | 13:17 | |
nine | masak: Python is tidy by definition | 13:18 | |
masak: also pypi.python.org/pypi/PythonTidy/ | |||
13:18
mattp_ joined
13:19
mattp__ left
|
|||
Woodi | right, ODBC looks abandoned... | 13:19 | |
mrf | ugexe++++ # Grammer::HTTP | 13:21 | |
masak | nine: thank you. for both answers. :P | 13:22 | |
mrf: I had to go check whether the module name was actually misspelled like that ;) | |||
fortunately, it wasn't. | 13:23 | ||
mrf | masak: Rule 1. I cannot spell for toffee | ||
masak: In fact I can't spell no matter what you offer me | |||
masak | oh, and the modules.perl6.org page got a facelift, too | ||
whoever++ | |||
13:25
RabidGravy joined
13:27
ponzellus joined,
Ven joined
|
|||
brrt | nine: it's true. perl is vernacular english, and python is polygoon-journaal dutch | 13:27 | |
mrf | Grammars++ # I cannot express how awesome these things are. | 13:28 | |
geekosaur | speeling++ | 13:29 | |
13:30
E joined
13:31
E is now known as Guest79214
|
|||
Guest79214 | @@? | 13:31 | |
13:31
kalkin- joined
|
|||
kalkin- | hi | 13:31 | |
Guest79214 | hi ^__^ | ||
kalkin- | I'am trying to install rakudo and panda via rakudobrew | 13:32 | |
installing moarvm worked. but i have some issues installing panda | |||
13:32
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
kalkin- | when doing rakudobrew build-panda i'm getting the follwing error: nopaste.linux-dev.org/?783469 | 13:33 | |
13:33
Guest79214 left
|
|||
kalkin- | exucuting /home/user/.rakudobrew/moar-nom/panda/bin/panda also throws a error (Could not find Shell::Command in any of:...) | 13:34 | |
gfldex | is the pointed at directory in your PATH? | ||
kalkin- | well i added it and got the same error | 13:35 | |
btw the pointed dir does not exists | |||
so this might also be an issue :) | |||
Woodi | about grammars :) : let's say I have grammar for file format X. I can .parsefile("file") and it tells me if everything is ok and gives candies. but when "file" is badly formated somewhere, let's say: in the middle, it just returns error... how I can "iterate" over what was good up to the middle of file ? | ||
Ven | Woodi: using debugging tools like :dba() | ||
ponzellus | Hi all, I'm starting to play with p6, but got stuck creating a constructor for a class, which has an attribute of another custom-class. I fail to create a constructor, in which I can initiate the second class: gist.github.com/phamer/71b8b38e565bca363b81 | 13:36 | |
Ven | or, if it's for your debugging purposes, tools like Grammar::Debugger or Grammar::Tracer | ||
kalkin- | is there some down side to using rakudo-star package from Fedora 21? It is versioned as 0.0.2015.06. it seems recent enough for me | 13:37 | |
brrt | Woodi: in very general, 'that is not how grammars always work' | ||
kalkin- | or am i missing anything important? | ||
Woodi | Ven: debugging tools looks development-time tools... | ||
brrt | because (again in general) the meaning of the document might depend on the things after the broken-in-the-middle part | 13:38 | |
brrt wonders if he can find an example of that | |||
Ven | Woodi: Grammar::Debugger and Grammar::Tracer are, yes | ||
Woodi | :dba are in the "match" from subparse ? | 13:39 | |
brrt | my point is that the notion of the document until the parse error is not necessarily well-defined for all grammars | ||
gfldex | kalkin-: was does `perl6 --version` say? | ||
RabidGravy | ponzellus, I fixed it for you, left a comment on the gist | 13:41 | |
masak | m: sub foo($x, $y = my $unpassed = {}) { say "\$y was {$y === $unpassed ?? "NOT " !! ""}passed" }; foo(1); foo(2, 3) | ||
camelia | rakudo-moar 42e55e: OUTPUT«$y was NOT passed$y was passed» | ||
Woodi | brrt: I want to write script to "repair" files in not-yet-format-X. and for now grammars helps me *after* file is well formatted :) | ||
masak | ^ nice pattern for checking whether a parameter was passed or not | 13:42 | |
RabidGravy | ponzellus, the main point being that you don't need to supply a new() all the time, just use a "submethod BUILD" | ||
brrt | hmmmmmm | ||
kalkin- | gfldex: This is perl6 version 2015.09-420-g4b1df7b built on MoarVM version 2015.09-79-gee9fc2b | ||
ponzellus | RabidGravy, thanks a lot! though I think you pasted the original code? | ||
RabidGravy | I did, dud | 13:43 | |
hang on let me fix that | |||
ponzellus, that should be better | |||
13:44
blackcat joined
|
|||
brrt | i don't know how a grammar trace or grammar debugger work. but it seems to me that it'd be possible to write a class that gives you the half-parsed grammar | 13:44 | |
13:44
blackcat is now known as loren
|
|||
brrt | masak: that is so... silly considering the actual implementation of optional args in moarvm | 13:44 | |
ponzellus | I see, thanks! | ||
brrt | (it already employs a parameter-is-passed-conditional branch) | 13:45 | |
ponzellus | so, is there a rule of thumb when to use new() or BUILD()? | ||
loren | good evening everyone. Is there any function like perl5's 'getsocketname' in perl6 ? | ||
13:45
stmuk left
|
|||
RabidGravy | ponzellus, the BUILD gets called after the object has been constructed and before it is returned to the user | 13:46 | |
loren | I saw synopses said something instead of 'getsocketname' in IO modules . | ||
getsocketname -> getsockname | 13:47 | ||
Woodi | loren: generally in Perl6 shings like that are not in "language" but in modules | ||
RabidGravy | if you supply I new() then you have to construct the object yourself (probably using bless on the type object), you may want to do this for example if you want to have positional rather than named arguments to the constructor | 13:48 | |
13:48
FROGGS joined
|
|||
masak | brrt: but if you don't give it a *unique* default, you can't really tell an Any from nothing-was-passed. | 13:48 | |
Woodi | loren: i don't see this in doc.perl6.org/type/IO::Socket::INET | 13:49 | |
brrt | masak: i know. but we could just 'publish' the it-was-passed information to the frame? perhaps using an nqp op | ||
masak realizes there's no risk of such confusion in his case, and goes with a simple `$y?` :) | |||
gfldex | kalkin-: that looks very recent. However, right now I would not trust any distribution package. Have a look at github.com/rakudo/rakudo and github.com/tadzik/rakudobrew and build it yourself. | ||
TimToady | m: use NativeCall; sub getsockname ($s) is native {*}; | ||
camelia | ( no output ) | ||
Ven | Woodi: you can also use [<foo> || <.fail(..)>] | ||
loren | I find a RFC say will be in IO::Socket, but i found nothing.. | ||
Ven | the parser does that a lot | 13:50 | |
TimToady | something like that | ||
brrt | e.g. nqp:hasargn("$y") | ||
loren | www.perl6.org/archive/rfc/146.html , Is this available? | ||
TimToady | probably needs a better type on the argument though | ||
brrt | another option would be to give $y a special 'Unprovided' null-like value | ||
loren | design.perl6.org/S29.html#IO , this page mentioned 'getsockname' | 13:51 | |
kalkin- | g.d | ||
gfd | |||
ups sory | |||
RabidGravy | loren, it mentions as "obsolete" | ||
kalkin- | gfldex: i will open an issue at rakudobrew and we will see were it leads to | ||
Woodi | Ven: I will think a bit about what this means :) | 13:52 | |
loren | Ok, then i need something instead of that, have some idea ? RabidGravy | 13:53 | |
TimToady | m: use NativeCall; sub getsockname (int $s) is native {*}; say getsockname(0) | ||
camelia | rakudo-moar 42e55e: OUTPUT«(Mu)» | ||
RabidGravy | :) | ||
TimToady | well, 0 is probably not a socket there... | ||
13:54
rurban1 joined
|
|||
RabidGravy | It would be handier for those things if you could get the fd from the IO::Socket::INET | 13:54 | |
TimToady | well, and native getsockname wants 3 args | ||
RabidGravy | we'll gloss over that part ;-) | ||
Ven | m: class A{ method a { method b { } } }; | 13:55 | |
camelia | ( no output ) | ||
13:55
rurban left
|
|||
TimToady | m: use NativeCall; sub getsockname (int $s, Buf $b, int $l) is native {*}; my $b = Buf.new(0 xx 100); say getsockname(0,b,100) | 13:55 | |
camelia | rakudo-moar 42e55e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nLhTMYsLUJUndeclared routine: b used at line 1» | ||
13:55
weihan left
|
|||
loren | so, i would use nativecall instead ? | 13:56 | |
TimToady | m: use NativeCall; sub getsockname (int $s, Buf $b, int $l) is native {*}; my $b = Buf.new(0 xx 100); say getsockname(0,$b,100) | ||
camelia | rakudo-moar 42e55e: OUTPUT«(Mu)» | ||
13:56
khw joined
|
|||
TimToady | something like that, only on an actual socket | 13:56 | |
loren | int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen); here is the signature | ||
TimToady | offhand I don't know how to get the fd from a handle | ||
RabidGravy | I don't think there currently is a way that is obvious | 13:57 | |
TimToady | maybe after we bypass libuv for sync IO it'll be easier to get to | 13:58 | |
'course, then you still couldn't do the async and get the sockname | |||
doubtless libuv knows the fd somewhere though | 13:59 | ||
dalek | ast: 941f7aa | lizmat++ | S06-parameters/smiley.t: Disable premature 'use parameters' tests for now |
||
loren | ok, then i implement the 'pasv' mode first.. | 14:00 | |
dalek | kudo/nom: a31cc91 | lizmat++ | src/core/Exception.pm: Handle typecheck errors with Failures better Fixes RT #126394 |
14:01 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126394 | ||
RabidGravy | TimToady, int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) in docs.libuv.org/en/v1.x/handle.html | 14:03 | |
TimToady | well, then, someone just needs to hook it up, I guess | 14:04 | |
14:05
_28_ria left
14:06
AndyDee left
14:07
eliasr left
|
|||
pmurias | konobi: you might want to look at docs/HACKING-js | 14:08 | |
14:09
_28_ria joined
|
|||
TimToady | lizmat: why not use 'method priors' that was already there? | 14:10 | |
lizmat | TimToady: good question | ||
I guess I had forgotten about priors | |||
hmmm... looks like I would need to change it in a lot of messages with priors :-( | 14:12 | ||
TimToady | messing with gotn only really works well if we use it as the last thing in the message | ||
14:13
skids joined
|
|||
Ven | .tell timotimo for some reason, your constants in gtk_cairo_shooter are.. undefined in the rest of the file.. | 14:13 | |
yoleaux | Ven: I'll pass your message to timotimo. | ||
lizmat | TimToady: looks like it is everywhere | 14:14 | |
Ven | .tell timotimo btw, `perl6 livecoding.p6` errors with "Internal error: Unwound entire stack and missed handler" on my computer :[ | ||
yoleaux | Ven: I'll pass your message to timotimo. | ||
TimToady | why wasn't priors catching the Failure already? | 14:15 | |
lizmat | m: my Int $x = fail "important failure message" | 14:16 | |
camelia | ( no output ) | ||
lizmat | hmmm.... | ||
I'm not sure... | |||
maybe because there wasn't any prior yet ? | |||
TimToady | m: say nqp::isconcrete(Failure.new("oops")) | 14:17 | |
camelia | rakudo-moar 42e55e: OUTPUT«1» | ||
TimToady | well, it's not that | ||
I was a little surprised when the bug report came out, since it was supposed to handle that already... | 14:18 | ||
lizmat | well, maybe not that case :-( | ||
14:18
Ulti joined
|
|||
lizmat | I need to go afk for a few hours... | 14:19 | |
TimToady | o/ | ||
lizmat | when I'm back, I'll have a new P6W | ||
loren | o/ | ||
I'm back.. | |||
lizmat | if anybody has anything to be mentioned in it, let me know | ||
Ven | lizmat++ :) | ||
loren | I want get local ip address .. | 14:21 | |
Ven | lizmat: I know the perl weekly already had a few p6 links | ||
you might want to look at them | |||
14:21
AndyDee joined
|
|||
lizmat | gist.github.com/lizmat/6b02537b05ff01aed226 # for the very curious | 14:22 | |
loren | 'gethost' not exist too, like 'getsockname'. i fell a little 'tired' | ||
moritz | lizmat: "now show the embedded Exception message" ~~ s/show/shows/ | 14:24 | |
14:25
aborazmeh left,
itz_ joined
|
|||
brrt | loren: there exists a LWP package for perl6, that may have an implementation of some of these things | 14:25 | |
Ven | lots of great perl6 blog posts :) | ||
14:25
itz_ is now known as itz_stmil
14:26
itz_stmil is now known as itz_stmuk,
softmoth joined
|
|||
loren | brrt, Is that perl6 standard module ? I really don't want to add another module to my project | 14:27 | |
lizmat | moritz: disagree, show is about the Typecheck errors <-- note multiple | 14:29 | |
the comma however should probably go | |||
brrt | loren: rakudo-the-compiler ships only with very few modules, iirc just 'Test' and maybe some debugging modules | ||
lizmat | really afk& | ||
14:29
telex left
|
|||
brrt | rakudo-star-the-distribution probably ships LWP, but i'm not 100% sure | 14:30 | |
14:30
telex joined
|
|||
brrt | it was more a suggestion in term of 'maybe that is an interesting example of how to do networking in perl6' :-) | 14:30 | |
loren | ok, brrt i will try it later , thks very much | 14:31 | |
brrt | :-) you're welcome | ||
please forgive perl6 for not being entirely finished and solid just yet | |||
loren | En, I want to implement a ftp client in perl6, there are a lot of problems. | ||
timotimo | rakudo only ships with Test, lib and NativeCall | 14:32 | |
yoleaux | 14:13Z <Ven> timotimo: for some reason, your constants in gtk_cairo_shooter are.. undefined in the rest of the file.. | ||
14:14Z <Ven> timotimo: btw, `perl6 livecoding.p6` errors with "Internal error: Unwound entire stack and missed handler" on my computer :[ | |||
timotimo | though i believe lib is now not even a module any more | ||
loren | I'll never give up it. | ||
timotimo | so yeah, only Test and NativeCall | ||
brrt | well, if you find missing stuff, bugs, feel free to report them | ||
timotimo | Rakudo * ought to come with some http thing | ||
brrt | loren: your experience is very valuable to us. that sounds very corporate, but it's true :-) | 14:33 | |
loren | OK, BTW, will private multi method implement soon ? | ||
timotimo | we don't have that yet? | ||
loren | ee, in my version not exist. | ||
i'm still use the last release . | 14:34 | ||
Ven | m: class A { multi method !a(Int) {}; multi method !a(Str) {} }; | ||
camelia | rakudo-moar a31cc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hBq6HhEdZvPrivate multi-methods are not supportedat /tmp/hBq6HhEdZv:1------> 3class A { multi method7⏏5 !a(Int) {}; multi method !a(Str) {} };» | ||
timotimo | oh | ||
didn't know that | |||
Ven | timotimo: I think the bug I .tell'd you is similar to mine | 14:35 | |
pmurias | konobi: if you have any questions about nqp-js I'll glady answer them | ||
timotimo | i must say i don't love gtk. | 14:36 | |
at all. | |||
loren | The function name is longer and longer .. | 14:37 | |
Ven | timotimo: oh. | ||
14:37
weihan joined
|
|||
itz_stmuk | I don't think there are any nice GUI libraries | 14:37 | |
timotimo | qt always felt nice to me | ||
loren | What about wxWidgets | 14:38 | |
Ven | itz_stmuk: Delphi :P | ||
dalek | kudo/nom: 48a0888 | TimToady++ | src/core/Exception.pm: easier to fix the original precedence bug :) |
14:39 | |
itz_stmuk | TK :D | ||
14:40
weihan left
14:41
weihan joined
14:42
freeze left
|
|||
PerlJam | huh | 14:43 | |
14:43
g4 left
|
|||
PerlJam would have missed that precedence bug too | 14:44 | ||
14:44
freeze joined
|
|||
TimToady | well, obviously I missed it when I installed it in the first place :) | 14:45 | |
flussence | fltk's an option now we have C++... | 14:46 | |
jdv79 | is someone working on async db? | ||
saw some mention in the backlog | 14:47 | ||
14:47
Alina-malina left
|
|||
PerlJam | TimToady: small bugs like that worry me a little for future code maintenance. | 14:49 | |
(mostly I worry that it will cause a rash of superstitious parens) | 14:50 | ||
14:52
rurban joined
14:53
rurban1 left
15:00
Ven_ joined
15:01
Ven left
|
|||
[Coke] returns from a routine checkup, nothing to see here. | 15:01 | ||
15:03
firstdayonthejob left
|
|||
[Coke] | RT: 1037; weird: 11; lta: 88; nom: 8; glr: 4; tests: 9; xmas: 74 | 15:03 | |
15:03
Ven_ left,
Ven joined
|
|||
moritz | what's an easy way to get all xmas-tagged open tickets? | 15:04 | |
15:04
Alina-malina joined
|
|||
[Coke] | rt.perl.org/Ticket/Display.html?id=123766 | 15:05 | |
Anything without a line through it. | |||
anyone thinking of taking up thalhammer on his coverity email? | 15:06 | ||
15:07
n0tjack joined
|
|||
moritz | m: sub foo { @_[0] = "bah" }; my $a = "!"; foo($a); say $a # RT #71112 | 15:08 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...l?id=71112 | ||
camelia | rakudo-moar a31cc9: OUTPUT«!» | ||
15:10
diana_olhovik left
|
|||
moritz | ok, revolutionary idea | 15:11 | |
how about we make @_ (and other slurpies) a List instead of an Array? | 15:12 | ||
TimToady | then you couldn't shift it? | ||
moritz | aye | ||
15:12
Akagi201 left
|
|||
TimToady | and you can always do +foo instead | 15:13 | |
though perhaps we should allow *foo and **foo too | |||
moritz | 'cause if @_ stays an array, the example above will never blow up, as you requested some years ago :-) | 15:14 | |
TimToady | in P5 the elements of @_ are raw refs, though | 15:16 | |
15:16
s_kilk joined
|
|||
moritz | that doesn't mean they need to be in 6 | 15:17 | |
m: module A { enum Day is export <Mon Tue>; sub Day is export { 'sub Day' } }; import A; say Day(0); | |||
camelia | rakudo-moar a31cc9: OUTPUT«Mon» | ||
15:18
n0xff joined
|
|||
moritz | m: say 'ö'.encode('ASCII') | 15:19 | |
camelia | rakudo-moar a31cc9: OUTPUT«Blob[uint8]:0x<3f>» | ||
ilmari | m: say '→'.encode('ASCII') | 15:20 | |
camelia | rakudo-moar a31cc9: OUTPUT«Blob[uint8]:0x<3f>» | ||
15:20
CIAvash joined
|
|||
moritz | m: say '→'.encode('ASCII').decode | 15:20 | |
camelia | rakudo-moar a31cc9: OUTPUT«?» | ||
15:20
reneeb left
|
|||
moritz | it uses the question mark as replacement character | 15:20 | |
which makes me unhappy (RT #123673) | 15:21 | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=123673 | ||
ilmari | surely charcters that don't exist in the target encoding should throw an exception | ||
15:21
ponzellus left
|
|||
moritz | see the ticket I mentioned :-) | 15:22 | |
ilmari | $ python -c '"ø".encode("ascii")' | ||
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) | |||
buggy error message, should be s/\<de/en/ | |||
and s/byte/character/ | 15:23 | ||
15:23
ely-se left,
firstdayonthejob joined
15:24
et09 joined
|
|||
et09 | is there any way to not have to type semicolons, like in JS ES6? | 15:24 | |
boggard | i've never heard a good argument for that. | 15:25 | |
et09 | less typing | ||
guess it's just a parser design argument | |||
vs that | 15:26 | ||
:m { 3.say } | |||
PerlJam | semicolons are not that onerus to type :) | 15:27 | |
et09 | every char adds up | ||
moritz | et09: Perl 6 allows you to omit the semicolon after a } if it's followed by a newline | ||
masak | et09: optional semicolons are not new with ES6. rather, it's a regretful misfeature from ES1 that's not possible to remove. | 15:28 | |
15:29
abaugher left
|
|||
et09 | maybe haskell is a better example | 15:29 | |
of course they have indent-coding | |||
15:29
abaugher joined,
[Sno] left
|
|||
masak | I don't think Perl 6 would fit well with a semicolon-less style, to be honest | 15:29 | |
I don't mean esthetically -- I mean it wouldn't work so well in practice | |||
PerlJam | semicolons make nice sequence points | ||
pmurias | et09: for sure there will be a module to turn off required semicolons | 15:30 | |
masak | also, they allow for free-form statements | ||
kalkin- | i fixed my issue an installation of perl-Test-Harness-3.35-1.fc21.noarch fixed it | ||
et09 | all i know is my life is 5x easier since i started using babel for es6 on the backend | ||
15:30
[Sno] joined
|
|||
et09 | () => { } too (even though that's still not the prettiest | 15:30 | |
flussence | parens are optional in single-arg js lambdas | 15:31 | |
et09 | i know | ||
so are the { } for a single statement block | |||
_.map(objs, obj => obj.prop * 2) | |||
pmurias | et09: for a semicolon less style the way python inserts them seems much more sane than what javascript does | 15:32 | |
PerlJam | et09: are you *sure* you want perl 6? ;) | ||
flussence | @objs».prop »*» 2 is still shorter :) | ||
et09 | well i seem to like everything else i read about it | 15:33 | |
python's not very expressive is it | |||
15:35
xfix joined
15:36
AlexDaniel joined,
rurban left
|
|||
flussence | python is a strange middle ground between perl and php | 15:37 | |
15:37
abaugher left
|
|||
flussence | all the compatibility breaks of the former and all the progress of the latter :) | 15:38 | |
et09 | you mean 2/3 ? | ||
n/m i get it, lol | |||
flussence | I'm not sure any more; they seem to keep changing APIs even in the 2 series | 15:39 | |
et09 | i barely ever use python, i just know once in a while i have to open a program and change the hashbang so it uses the right python | ||
15:39
abaugher joined
|
|||
kalkin- | well at least you was sure if you started a new project that it's going to bea php5. if I start a python project most of the time i think 2 or 3? does it even mater? | 15:40 | |
15:40
rurban joined
|
|||
kalkin- | s/you was/you were/ | 15:40 | |
flussence | py3.5 has one nice feature that I've seen: they've stolen q:c"" :) | 15:41 | |
15:42
spider-mario left
|
|||
flussence | (and put it into a string prefix letter I can't remember the mnemonic of...) | 15:42 | |
15:42
abaugher left,
Ven left
15:43
brrt left
|
|||
ilmari | moritz: #123673 needs fixing in nqp, since Str.encode just calls nqp::encode() | 15:43 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=123673 | ||
loren | good night, every one and perl6. | 15:45 | |
ilmari | j: say 'å'.encode('ASCII') | 15:46 | |
camelia | rakudo-jvm 48a088: OUTPUT«Blob[uint8]:0x<3f>» | ||
15:46
spider-mario joined
|
|||
PerlJam | .oO( loren ipsun dolos siu ) |
15:46 | |
loren | o/ PerlJam | 15:47 | |
PerlJam | good night :) | 15:48 | |
ilmari | the jvm backend just uses String.getBytes, which says «The behavior of this method when this string cannot be encoded in the default charset is unspecified.» | ||
«The CharsetEncoder class should be used when more control over the encoding process is required.» | 15:49 | ||
itz_stmuk | is there anyway of using the debugger to set breakpoints inside CORE.setting? | ||
15:49
loren left
|
|||
dalek | ast: 3e936df | coke++ | S06-parameters/smiley.t: Use fudge directives |
15:50 | |
15:50
domidumont left
15:52
tokuhiro_ left,
rurban1 joined
|
|||
dalek | osystem: 5f6c96b | (Shoichi Kaji)++ | META.list: add Frinfon |
15:53 | |
osystem: 07a25f8 | (Zoffix Znet)++ | META.list: Merge pull request #81 from shoichikaji/frinfon add Frinfon |
|||
15:54
rurban left
15:55
n0tjack left
15:57
Ch0c0late joined
|
|||
dalek | kudo/nom: c32c57f | TimToady++ | docs/ChangeLog: TimToady changes since last release |
16:00 | |
16:00
n0tjack joined
16:01
SuzieQueue joined,
s_kilk left
16:04
Suzeanne left
|
|||
TimToady | flussence: X* is even sorter than »*» | 16:06 | |
flussence | sometimes I wonder... with X what's »» good for? | 16:07 | |
16:07
Akagi201 joined,
colomon left
|
|||
flussence | oh right, parallelization | 16:07 | |
forgot that actually works now :) | |||
TimToady | and it has different semantics on the short end | ||
»» is more like APL semantics | 16:08 | ||
replicates the short dimension | |||
well, I guess X does that too, was thinking of Z | |||
16:08
dha joined
|
|||
n0tjack | m: say 'short' >>~>> 'longer'; | 16:08 | |
camelia | rakudo-moar 48a088: OUTPUT«shortlonger» | ||
n0tjack | m: say 'short'.comb >>~>> 'longer'.comb; | 16:09 | |
camelia | rakudo-moar 48a088: OUTPUT«(sl ho on rg te)» | ||
n0tjack | heh | ||
TimToady | but X and Z are naturally for two lists (so you don't need parens on either side), while hypers are more for matrices and such | ||
16:10
kjs_ joined
|
|||
TimToady | n0tjack: yeah, there's that too | 16:10 | |
list vs matrix is why X and Z are quite loose, and hypers follow their base operator's precedence | 16:11 | ||
n0tjack | what's the idiomatic way to say matrix-mult in p6? | ||
n0tjack realizes he doesn't even know how to idiomatically intialize a 2D matrix in p6 | 16:12 | ||
TimToady | we don't quite have the notation yet, but that'll be here in a few weeks, since we have the underlying primitives in line | 16:13 | |
so we don't have a matrix multiply built in yet, but see rosettacode.org/wiki/Matrix_multipl...ion#Perl_6 | |||
we can subscript with multi-dims, but we just don't have the "shaped" declaration syntax hooked up | 16:14 | ||
n0tjack | surely there's more concise way than @p[$r][$c] += @a[$r][$_] * @b[$_][$c] | ||
TimToady | sure, look down further :) | ||
n0tjack | like with [+] and >>*<< etc | ||
there we go :) | 16:15 | ||
16:16
^elyse^ joined
|
|||
TimToady | when I saw you wanted that, I hopped into my DeLorean and went back to add it earlier :) | 16:16 | |
boggard | let's go cubbies! | ||
PerlJam | At some point it will be useful to have some PDL -> P6 examples (or perhaps NumPy/matlab/octave/etc -> P6) | 16:17 | |
16:18
colomon joined
|
|||
TimToady | well, we really need to get the abstract slicing carried over from PDL before that makes sense, unless we're talking about P6 sugar over P5 PDL | 16:18 | |
but we do have lotsa sugar :) | |||
n0tjack: also, that implementation is really just for Array of Array, not real matrices | 16:20 | ||
real mat ops will want to keep things in native shaped arrays when possible | 16:21 | ||
[Coke] | should pod N<>'s be separated from the thing they note by whitespace?: e.g. filesN<a note> vs. files N<a note> | 16:23 | |
PerlJam | [Coke]: no whitespace is how I've been doing it. | ||
n0tjack | how is a native shaped array laid out in memory? | 16:24 | |
PerlJam | n0tjack: efficiently ;) | ||
n0tjack | in the APLs, it's something like {flags}{shape}{ravel} | ||
ilmari | n0tjack: as a C compiler would | ||
n0tjack | well, let me ask a different way: row major or column major? | ||
ok | |||
ilmari | (one of the use cases is NativeCall) | ||
TimToady | but since we have representational polymorphism, it'd be easy to support column major in a pinch | 16:25 | |
ilmari | ah, NativeCall has its own CArray type | ||
n0tjack | one fun thing in J is you can "hide information" in the shape of an empty array | ||
[Coke] | PerlJam: makes running things like spell check marginally harder. | 16:26 | |
TimToady | just leave off the {ravel}, eh? | ||
n0tjack | kinda | ||
if you use 0s and 1s as the lengths of each axis, then the volume will be either 0 or 1 | 16:27 | ||
TimToady | well, we use descriptors rather than inlining, but similar idea if you have a shaped type without instantiating | ||
n0tjack | thus: 1 1 0 1 0 0 0 1 1 0 1 0 0 1 0 1 0 0 0 0 1 $ 'whatever' prints as empty | ||
but you can ask for the shape, convert it to ascii, and get 'hi!' | |||
FROGGS | o/ | ||
PerlJam | [Coke]: aye. | ||
16:27
takadonet left
16:28
pierrot_ joined,
freeze left,
Hotkeys_ left,
diego_k left
|
|||
FROGGS would really like to get below 2**10 RTs this week | 16:28 | ||
dalek | c: 05b19b7 | coke++ | doc/ (27 files): Fix typos. Remove some nounifications. |
||
c: 75361a3 | coke++ | doc/ (2 files): Space out highlighted words. |
|||
16:29
boggard left,
gonz_ left,
lucs left,
ponbiki left,
silug left,
BooK left,
nine left
|
|||
[Coke] | PerlJam: ^^ spaces out an L & and a B but left the N's alone. | 16:29 | |
16:29
espadrine_ joined
|
|||
TimToady | I have a vague suspicion that the inline representation would make it difficult to support extensible dimensions the way a descriptor based approach can | 16:29 | |
16:29
^elyse^ left,
diegok joined,
espadrine left,
pierrot left,
jferrero left,
gfldex left,
moznion left,
charsbar left,
cfloare left
|
|||
FROGGS | m: "" ~~ /{}*/; say "alive" | 16:29 | |
TimToady | you'd have to reshape the array every time you write to such a dimension | ||
[Coke] | Help request: doc reviews of non technical "is this english" always appreciated. | ||
camelia | rakudo-moar c32c57: OUTPUT«(timeout)» | 16:30 | |
16:30
freeze joined,
boggard joined,
nine joined
|
|||
FROGGS | [Coke]: heh, I can't help you there :o) | 16:30 | |
16:30
BooK joined,
ponbiki joined,
lucs joined,
gonz_ joined,
jferrero joined
|
|||
TimToady | .tell lizmat pretty much everything I did this week is reflected in the git log | 16:30 | |
yoleaux | TimToady: I'll pass your message to lizmat. | ||
16:30
ponbiki is now known as Guest58273
16:31
z448 joined,
gfldex joined,
jevin joined,
abraxxa left
|
|||
[Coke] | continue to be kind to your release engineer and update the changelog. Thanks to everyone I've seen pushing stuff in there this week! | 16:32 | |
16:33
weihan left,
Hotkeys joined
|
|||
TimToady | and please don't use backticks for quotes, it's really ugly | 16:33 | |
16:34
moznion joined
|
|||
moritz | TimToady: it's markdown, it's what markdown uses for code | 16:34 | |
16:34
z448 left
|
|||
TimToady | well, then, markdown is ugly | 16:34 | |
and the file is not marked as markdown, and the file is not consistently formated | 16:35 | ||
moritz | ah well | ||
as long as the release announcements remain markdown ('cause we convert them to HTML) | 16:36 | ||
16:38
Guest58273 is now known as ponpon
16:39
cfloare joined,
domidumont joined
16:40
n0tjack left
|
|||
[Coke] | I would be fine if we renamed the changelog to declare markdown | 16:44 | |
16:44
charsbar joined,
mullagainn joined
|
|||
[Coke] | anything that streamlines the release process. | 16:44 | |
16:44
takadonet joined
|
|||
moritz | do we do anything with the changelog? | 16:45 | |
copy&paste into the release announcement, for example? | |||
FROGGS | that's what I do, yes | 16:46 | |
but nothing besides that | |||
16:48
PsuzeannePsy joined
16:49
^elyse^ joined
|
|||
[Coke] | TIL what a zeugma is: brokemaniacsmusicbox.tumblr.com/pos...fordancing | 16:50 | |
16:50
dakkar left
16:51
SuzieQueue left,
silug joined
|
|||
itz_stmuk | what city is the first beta? | 16:51 | |
16:53
tokuhiro_ joined
16:55
kjs_ left
16:57
tokuhiro_ left
17:00
kjs_ joined
|
|||
[Coke] | There is no tag chosen yet. | 17:00 | |
17:02
pmurias left
|
|||
TimToady | right now the version is v6.b, but maybe it should be v6.b.0 so we have somewhere to go between birthday and chrismas | 17:02 | |
17:02
apotheon left
|
|||
TimToady | a pity that 'thanksgiving' doesn't come between birthday and christmas... | 17:03 | |
and it's a bit US-centric anyway | |||
'course, birthday is a bit me-centric :) | |||
ilmari | halloween? | ||
TimToady | wrong month | ||
and still out of order | |||
ilmari | yeah | 17:04 | |
TimToady | this is the first birthday release, anyway | ||
17:04
n0tjack joined
|
|||
dha | there's always v6.[c..z] if you need room to move in the meantime... | 17:05 | |
[Coke] | btw, this release will probably have 3 tags: the monthly, the city, and whatever the v6 tag ends up being. | ||
dha: I think christmas is v6.c | |||
dha | oh. never mind. | ||
itz_stmuk | and the bug fix release is orthodox Christmas :) | 17:06 | |
konobi | thanksgiving was delicious | ||
dha | we could rejigger it so we put it out for quanZa instead and use the c..z notation. :-) | ||
PerlJam | as long as we don't have a christmas release and a boxing day release, we'll be okay :) | 17:07 | |
17:09
rurban joined
|
|||
TimToady | I think the next one after christmas is diwali | 17:10 | |
17:11
rurban1 left
|
|||
FROGGS | hmm, that means the one after that won't be EchoChamber? | 17:12 | |
17:12
apotheon joined
|
|||
n0tjack | m: say [+] 'theologica'.comb>>.ord; | 17:12 | |
camelia | rakudo-moar c32c57: OUTPUT«1055» | ||
TimToady | m: say [+] 'theologica'.ords | 17:13 | |
camelia | rakudo-moar c32c57: OUTPUT«1055» | ||
n0tjack | I don't get why more modern languages don't offer implicit looping | ||
I think there's an analogy between hypers : looping-for-everthing :: structured-programming : gotos-for-everything | 17:15 | ||
17:15
Akagi201 left
|
|||
TimToady | well, the OO folks don't think a loop is an object, and the FP folks don't want to admit loops exist at all | 17:16 | |
17:16
atta_ is now known as atta
|
|||
TimToady | so most such solutions are ad hoc | 17:17 | |
n0tjack | yeah, I never understood that attitude from the FP people | 17:18 | |
TimToady | lazy lists are starting to think like that, but tend to be embedded in languages with strong head/tail biases | ||
n0tjack | one of the big attractions to p6 for me is the cohesive integration of FP and implicit looping, without giving me carpal parenthetical syndrome | 17:20 | |
(how (can (people (even (look (at (this)))))))))? | |||
^elyse^ | you mean "(how (can (people (even (look (at (this ())))))))))?" | 17:21 | |
17:21
apotheon left
|
|||
n0tjack | ha | 17:22 | |
dalek | osystem: 1100901 | moznion++ | META.list: Add Text::LTSV |
||
^elyse^ | m: my $xs = [1, 2, 3, 4]; say $xs>>.sqrt | 17:31 | |
camelia | rakudo-moar c32c57: OUTPUT«[1 1.4142135623731 1.73205080756888 2]» | ||
^elyse^ | Why does this not try to call Array.sqrt? | ||
m: my @xs = [1, 2, 3, 4]; say @xs>>.sqrt | 17:32 | ||
camelia | rakudo-moar c32c57: OUTPUT«[1 1.4142135623731 1.73205080756888 2]» | ||
^elyse^ | And why does this not result in a list? :v | ||
[Coke] | todo: doc search finds nothing for >> | 17:33 | |
dalek | p: 41ab646 | FROGGS++ | src/QRegex/P6Regex/ (2 files): throw when quant follows nonquantable |
17:34 | |
^elyse^ | I'm still confused about arrays vs lists. | ||
[Coke] | docs.perl6.org/type/Array - An Array is a List which forces all its elements to be scalar containers, which means you can assign to array elements. | 17:35 | |
dha | Yeah, I was just looking for >> too. | ||
^elyse^ | oh, Array is a subclass of List | ||
that makes sense then | 17:36 | ||
dalek | kudo/nom: de4b2b3 | FROGGS++ | / (3 files): throw when quant follows nonquantable |
||
n0tjack | m: my @list = (1,2,3,4); my @list[1] = 99; say @list; | ||
camelia | rakudo-moar c32c57: OUTPUT«5===SORRY!5===Shaped arrays not yet implemented. Sorry. at /tmp/AmDbEgSWFf:1------> 3my @list = (1,2,3,4); my @list[1]7⏏5 = 99; say @list; expecting any of: constraintOther potential difficulties: Redeclaration o…» | ||
n0tjack | huh | ||
m: my @list = [1,2,3,4]; my @list[1] = 99; say @list; | |||
camelia | rakudo-moar c32c57: OUTPUT«5===SORRY!5===Shaped arrays not yet implemented. Sorry. at /tmp/31YD5t81OT:1------> 3my @list = [1,2,3,4]; my @list[1]7⏏5 = 99; say @list; expecting any of: constraintOther potential difficulties: Redeclaration o…» | ||
FROGGS | n0tjack: drop the second 'my' | ||
n0tjack | thanks | 17:37 | |
m: my @list = [1,2,3,4]; @list[1] = 99; say @list; | |||
camelia | rakudo-moar c32c57: OUTPUT«[1 99 3 4]» | ||
17:37
[Sno] left
|
|||
n0tjack | m: my @list = (1,2,3,4); @list[1] = 99; say @list; | 17:37 | |
camelia | rakudo-moar c32c57: OUTPUT«[1 99 3 4]» | ||
17:37
][Sno][ joined
|
|||
n0tjack | seems I can assign to array or list indices? | 17:37 | |
17:37
apotheon joined
|
|||
FROGGS | n0tjack: and @foo variable will be of type Array anyway | 17:37 | |
n0tjack | oh, IS ee | ||
skids | Just changing the variable name to "list" does not make it a list | ||
:-) | |||
FROGGS | hehe | 17:38 | |
^elyse^ | Hmm, Rakudo prints "sorry" twice | ||
n0tjack | skids: it wasn't the name I was thinking about, it was the shape of the brackets: () vs []. | ||
skids | I know I was kidding. | ||
^elyse^ | pipe its output to INTERCAL and it'll tell you that Rakudo is overly polite | ||
m: my @xs = [1, 2]; @xs.say | |||
camelia | rakudo-moar c32c57: OUTPUT«[1 2]» | ||
et09 | m: say map {x .ord % 5},'A'..'z' | ||
camelia | rakudo-moar c32c57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JmCJCFrJ2aUndeclared routine: x used at line 1» | ||
n0tjack | m: my @list := (1,2,3,4); @list[1] := 99; say @list; | ||
^elyse^ | m: my @xs = [1, 2], [3, 4]; @xs.say | ||
et09 | m: say map {$_ x (.ord % 5)},'A'..'z' | 17:39 | |
n0tjack | did I break something? | ||
^elyse^ | RIP camelia | ||
dalek | ast: 95ee327 | FROGGS++ | S05-metasyntax/repeat.t: add tests for non-quantable exceptions |
||
camelia | rakudo-moar c32c57: OUTPUT«(timeout)» | ||
rakudo-moar c32c57: OUTPUT«[[1 2] [3 4]]» | |||
rakudo-moar c32c57: OUTPUT«( B CC DDD EEEE G HH III JJJJ L MM NNN OOOO Q RR SSS TTTT V WW XXX YYYY [ \\ ]]] ^^^^ ` aa bbb cccc e ff ggg hhhh j kk lll mmmm o pp qqq rrrr t uu vvv wwww y zz)» | |||
et09 | weeee | ||
^elyse^ | hmm | ||
m: my @xs = [1, 2],; @xs.say | |||
camelia | rakudo-moar c32c57: OUTPUT«[[1 2]]» | ||
^elyse^ | ah cool | ||
et09 | m: say map {$_ x ((.ord % 5)+1)},'A'..'z' | 17:40 | |
camelia | rakudo-moar c32c57: OUTPUT«(A BB CCC DDDD EEEEE F GG HHH IIII JJJJJ K LL MMM NNNN OOOOO P QQ RRR SSSS TTTTT U VV WWW XXXX YYYYY Z [[ \\\ ]]]] ^^^^^ _ `` aaa bbbb ccccc d ee fff gggg hhhhh i jj kkk llll mmmmm n oo ppp qqqq rrrrr s tt uuu vvvv wwwww x yy zzz)» | ||
^elyse^ | m: my @xs = [1]; my @ys = 1; say(@xs == @ys) | ||
camelia | rakudo-moar c32c57: OUTPUT«True» | ||
^elyse^ | special case :'( | ||
TimToady | one arg rule | ||
not so special | |||
^elyse^ | m: my @xs = [1]; my @ys = 1; say($(@xs) == $(@ys)) | ||
camelia | rakudo-moar c32c57: OUTPUT«True» | ||
^elyse^ | m: say([1] == 1) | ||
camelia | rakudo-moar c32c57: OUTPUT«True» | ||
^elyse^ | m: say([1] === 1) | 17:41 | |
camelia | rakudo-moar c32c57: OUTPUT«False» | ||
TimToady | m: my @xs = $[1]; my @ys = 1; say(@xs == @ys) | ||
camelia | rakudo-moar c32c57: OUTPUT«True» | ||
TimToady | m: my @xs = $[1]; my @ys = 1; say(@xs eqv @ys) | ||
camelia | rakudo-moar c32c57: OUTPUT«False» | ||
TimToady | == is just comparing lengths, while === is comparing object identities | 17:42 | |
^elyse^ | oh right, == does numeric comparison | ||
TimToady | so neither is really what you want here | ||
^elyse^ | m: my @xs = [1]; my @ys = 1; say(@xs eqv @ys) | ||
camelia | rakudo-moar c32c57: OUTPUT«True» | ||
^elyse^ | m: my $xs = [1]; my @xs = $xs; my @ys = 1; say(@xs eqv @ys) | ||
camelia | rakudo-moar c32c57: OUTPUT«False» | ||
^elyse^ | ok nice | 17:43 | |
TimToady | list assignment follows the one-arg rule, so it iterates the [1] | ||
but not with that last example, because $xs has a $ on it | |||
^elyse^ | I get it. | ||
rakudo.org/downloads/star/ should use HTTPS IMO | 17:45 | ||
pink_mist | iirc they applied (or was that just perl6.org?) for one of letsencrypt.org's beta certs, but dunno if they got it ... and soon enough that's not gonna need beta anyway | 17:46 | |
moritz | I did apply for perl6.org | 17:47 | |
^elyse^ | ok cool | ||
TimToady | wow, "All tests successful."--I'd forgotten what that looks like... | ||
pink_mist | right =) | ||
TimToady++ lol | |||
et09 | m: say "!".."~" | ||
camelia | rakudo-moar c32c57: OUTPUT«"!".."~"» | ||
et09 | hmph | ||
m: say "+".."n" | |||
camelia | rakudo-moar c32c57: OUTPUT«"+".."n"» | 17:48 | |
^elyse^ | m: my @xs = 1, 2, 3; my @ys = 4, 5, 6; (@xs >>+<< @ys).perl.say; (@xs Z+ @ys).perl.say | ||
camelia | rakudo-moar c32c57: OUTPUT«[5, 7, 9](5, 7, 9).Seq» | ||
et09 | m: say list("+".."n") | ||
camelia | rakudo-moar c32c57: OUTPUT«(+ , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n)» | ||
TimToady | ranges are primarily intervals, not lists | ||
n0tjack | m: say ("!".."~").comb; | ||
camelia | rakudo-moar c32c57: OUTPUT«(! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R ...)» | ||
n0tjack | m: say ("!".."~").comb.elems; | ||
camelia | rakudo-moar c32c57: OUTPUT«187» | ||
TimToady | you're coercing to string and then combing | ||
probably because someone decided Range is Cool | 17:49 | ||
flussence | m: print "!".."~", "\n"; | ||
camelia | rakudo-moar c32c57: OUTPUT«!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~» | ||
TimToady | m: say Range.^mro | ||
camelia | rakudo-moar c32c57: OUTPUT«((Range) (Cool) (Any) (Mu))» | ||
^elyse^ | LOL stackoverflow.com/questions/3315251...-very-ugly | ||
n0tjack | what do you know, Range is Cool | ||
Cool Range dressing | |||
17:50
lichtkind joined
17:51
llfourn left
17:52
BLOKDAK left
17:53
BLOKDAK joined
|
|||
et09 | i get emails like that at my job | 17:55 | |
Why this feature is very ugly? | |||
pink_mist | I don't understand what you mean, et09 | 17:56 | |
n0tjack | pink_mist: et09 posted a link to a SO question asking "why is perl6 very ugly?" | ||
et09 | i didn't post that link | ||
n0tjack | oh, someone did | ||
tony-o | jnthn: are you working on compunit stuff/ | ||
TimToady | jnthn++ is on a honeymoon this week | 17:57 | |
pink_mist | n0tjack: I saw the link. and I saw that ^elyse^ posted it. I still don't see what that has to do with emails though, so I'm still as confused as ever | ||
moritz | github.com/reinderien/mimic | 17:58 | |
^elyse^ | is there a way to join paths with the platform's path separator? | ||
n0tjack | pink_mist: My take was "I get ridiculous and poorly-informed questions like [why is $feature so ugly] at my job" | ||
jdv79 | doesn't everything support / now | 17:59 | |
pink_mist | n0tjack: ahh, now it makes sense =) n0tjack++ | ||
18:00
amarigatachi joined
|
|||
TimToady | m: say 42xCDxBE say 43 | 18:00 | |
camelia | rakudo-moar de4b2b: OUTPUT«4243» | ||
moritz | ^elyse^: $*SPEC.catdir | ||
^elyse^ | cooooool thanks | 18:01 | |
TimToady | m: say 'xCDxBE'.ord | ||
camelia | rakudo-moar de4b2b: OUTPUT«59» | ||
TimToady | m: say 42xCDxBE say 43 | ||
camelia | rakudo-moar de4b2b: OUTPUT«4243» | ||
18:01
rurban left
|
|||
tony-o | jnthn++ | 18:01 | |
TimToady | huh, something is regularizing the Greek question mark to normal semicolon | ||
18:01
rurban joined
|
|||
TimToady | m: EVAL "say 42\x37e say 43" | 18:02 | |
camelia | rakudo-moar de4b2b: OUTPUT«4243» | ||
TimToady | yowsers | 18:03 | |
m: say "\x37e".ord | 18:04 | ||
camelia | rakudo-moar de4b2b: OUTPUT«59» | ||
TimToady | is that like a deprecated character or something? | ||
n0tjack | Wikipedia says it canonically decomposes to semicolon | 18:05 | |
18:05
vendethiel joined
|
|||
TimToady | but we're not using NFKD | 18:05 | |
18:06
Hor|zon left
18:07
Ch0c0late left
18:08
dha left
|
|||
jdv79 | is precomp still not happening? | 18:08 | |
5s to "use HTTP::UserAgent" - killin my flow here:( | 18:09 | ||
TimToady | jdv79: see irclog.perlgeek.de/perl6/2015-10-17#i_11392842 about that | 18:11 | |
jdv79 | i know. i thought precomp had been restored back to the old way but seems not. | 18:13 | |
ugexe | nope | ||
^elyse^ | is there a way to make run automatically append .bat and .cmd as appropriate on Windows? | ||
jdv79 | then i think i drank too much coffee to work with p6 today:( | ||
ugexe | there are typos in CUR::File/Installation in regards to the precomp-file argument | 18:14 | |
but if they are corrected it breaks loading | |||
n0tjack | it's really hard to be on a conference call and debug a Grammar at the same time | ||
ugexe | at least you arent debugging a grammar over a conference call | 18:15 | |
lizmat | jdv79: if we want to move towards a sustainable / non-fragile precomp environment, we need to implement quite some stuff first | ||
yoleaux | 16:30Z <TimToady> lizmat: pretty much everything I did this week is reflected in the git log | ||
jdv79 | sure. but was it really necessary to take a step backwards like that just to force the issue. | 18:17 | |
sad. makes hacking now unpleasant. | |||
et09 | what is a metaobject | ||
ugexe | it wasnt on purpose. its a typo that just happens to not cause any errors | ||
jdv79 | ugexe: are you talking to me? | ||
ugexe | yes | 18:18 | |
18:18
espadrine_ left
|
|||
jdv79 | oh. i thought i read tadzik said he broke it on purpose to force the issue. | 18:19 | |
i didn't look though | |||
ugexe | tadzik just took precompiling out of panda | ||
you could still manually precompile. i thought you meant loading such precompiled code | |||
jdv79 | no. i just meant when it used to just work | 18:20 | |
huh. well that's doubly unfortunate. neato. | |||
18:21
rurban left
18:22
^elyse^ left
|
|||
lizmat | fwiw, I'm glad that tadzik++ took precomp out of panda | 18:22 | |
vendethiel | no chance to get :D by default, btw? as a last-minute-decision :P | ||
lizmat | vendethiel: :D where ? | 18:23 | |
vendethiel | lizmat: everywheeere | ||
flussence | m: use attributes :D; my $x; | ||
camelia | ( no output ) | ||
lizmat | I was considering having a "use smileys :D" | ||
jdv79 | lizmat: that's funny. like saying it was great that lists stopped working the whole time the GLR was happening. | ||
flussence | oh right, $x isn't an attrib... | ||
lizmat | that would do a parameters/variables/attributes/invocent for you | ||
18:23
rurban joined
|
|||
jdv79 | it could/should have been a smoother move | 18:23 | |
flussence | m: use variables :D; my $x; | 18:24 | |
camelia | rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VNde_xE5_hVariable definition of type Any:D (implicit :D by pragma) requires an initializerat /tmp/VNde_xE5_h:1------> 3use variables :D; my $x7⏏5; expecting any of: constraint» | ||
lizmat | jdv79: agree it could have been planned better | ||
TimToady | not really | ||
lizmat | but first we need to do it correctly, and then fast | ||
vendethiel | m: my Any:D $x = Nil; | 18:25 | |
camelia | ( no output ) | ||
lizmat | jdv79: there were too many ways of introducing strange errors / inconsistencies in an environment with panda | ||
jdv79 | at least its only a startup type regression | 18:26 | |
18:27
Mouq joined
|
|||
lizmat | TimToady: do you know if the Craigslist presentation is online already ? | 18:28 | |
or the one from PPW ? | |||
18:28
Mouq left
|
|||
leedo | at some point in the last few weeks '[+] 0..1_000_000' went from taking 2.5s to taking 22s for me | 18:28 | |
TimToady | PPW wasn't recorded, and cl hasn't run it past me yet for approval, so no | 18:29 | |
I mean, yes, I know :) | |||
lizmat | TimToady :-( | ||
:-) | |||
leedo: could you be more specific than " last few weeks" ? | |||
is that 1,2,3, 10, 20 ? | |||
leedo | lizmat: no more than 3 weeks, probably closer to 2 | 18:30 | |
i'll try to narrow it down | |||
TimToady | reductions should definitely be eager | ||
lizmat | leedo: 25 secs for me | 18:31 | |
colomon | TimToady: really? seems like it would be massively more efficient to not create a 1,000,000 element list for that operation? | ||
leedo | it had been < 3 seconds for a year or two now | ||
TimToady | star: say [+] 1..1_000_000 | ||
camelia | star-m 2015.09: OUTPUT«500000500000» | ||
flussence | it's 42 seconds on my 32-bit netbook... and 42 seconds on my 64-bit desktop. | 18:32 | |
TimToady | well, that particular case ought to be optimized away anyhoo | ||
lizmat | maybe we lost the optimization :-) | ||
flussence | (the netbook's 2 months out of date on rakudo) | ||
colomon wonders if [+] should have a special sub for ranges | |||
lizmat | it's been known to happen | ||
TimToady | obviousl star still has it fast | ||
colomon: that's what I was trying to say | |||
leedo | colomon: i did propose that patch a few years ago | 18:33 | |
flussence | I have one of those in a gist somewhere... | ||
colomon | TimToady: ah! I was getting worried that I was missing another huge piece of the picture. | ||
leedo | github.com/rakudo/rakudo/pull/175 | ||
DrForr | Use Gauss's method in the spirit of Volkswagen, just be sure to check that you're on github :) | 18:34 | |
flussence | m: gist.github.com/flussence/3007551 | ||
camelia | rakudo-moar de4b2b: OUTPUT«125000250000» | ||
flussence | still works :D | ||
colomon fires off rakudobrew build moar Zürich | 18:35 | ||
18:36
leont joined,
rurban1 joined
18:38
rurban left
|
|||
colomon | hurm, rakudobrew failed to build it. :\ | 18:38 | |
grondilu | colomon: [+] should have a special sub for range indeed IMHO | 18:39 | |
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2015/10/19/...r-english/ | ||
flussence | lizmat++ | 18:40 | |
colomon | lizmat++ | ||
18:40
^elyse^ joined
|
|||
vendethiel | lizmat++ | 18:40 | |
moritz | lizmat++ # nice! | 18:41 | |
colomon | woah, there were that many blog posts in the last week? | 18:42 | |
vendethiel | yeah, tons of them | ||
lizmat | *and* ecosystem additions, yup! | ||
brrt++ for providing me with the inspiration for this week's title :-) | 18:43 | ||
grondilu appreciates the list of blog posts | |||
vendethiel | it's amazing | 18:44 | |
18:44
rurban joined
|
|||
colomon | so, apparently rakudobrew (and/or possibly rakudo itself) doesn’t like building “moar Zürich” but is fine with “moar c0e0c9748478d517956e38fe1f1a4aa89dba2419” (which is what Zürich is). | 18:45 | |
El_Che | thx lizmat | ||
18:45
rurban1 left
|
|||
grondilu is a bit confused by the title "Perl 6 just Perl 5 with ‘use strict’ turned on" and checks out the blog entry. | 18:45 | ||
lizmat | grondilu: Ferdinand should give it away | 18:46 | |
pyrimidine | :) | ||
[Coke] | colomon: I used a unicode tag on purpose. </evil> | ||
grondilu | thescienceweb.wordpress.com/2015/1...rned-on-2/ | ||
^ not sure what this is about | |||
colomon can confirm that c0e0c9748478d517956e38fe1f1a4aa89dba2419 handles [+] 1..1_000_000 quickly. Of course, it’s probably more or less the same as the star TimToady++ checked. | |||
grondilu | m: say [+] ^10*100 | 18:47 | |
camelia | rakudo-moar de4b2b: OUTPUT«499500» | ||
grondilu | m: say [+] ^10**100 | ||
lizmat | grondilu: "Dodgy Perl 5 scripts were behind the financial crisis of 2008, the collapse of Enron and the assassination of Archduke Franz Ferdinand." | ||
pyrimidine | grondilu: see what lizmat++ said | ||
colomon wants rakudobrew bisect, but doesn’t have the tuits to make it now | |||
camelia | rakudo-moar de4b2b: OUTPUT«(timeout)» | ||
leedo | colomon: yeah, i believe it was a change in october | ||
vendethiel | m: my %a = a => 1, b => 2, c => 3; %a{$_}++ for %a.keys; say %a.perl; | 18:48 | |
camelia | rakudo-moar de4b2b: OUTPUT«{:a(2), :b(3), :c(4)}» | ||
leedo | i'd have to guess 2275f64e2e447c86c7d3a5804891e5120f4eb212 | ||
pyrimidine | grondilu: also note the other articles from that blog | ||
18:49
kjs_ left
|
|||
grondilu | it would be a bit difficult to specialize [+] for ranges, as it is defined by &REDUCE(\op) or something. | 18:49 | |
^elyse^ | Can I mutate %hash while looping through %hash.keys? | ||
Or should I clone the list of keys first? | 18:50 | ||
TimToady | grondilu: no problem, it's a HOP function that can just pick what function to do the reduction with | ||
18:50
softmoth left
|
|||
grondilu | ok | 18:50 | |
vendethiel | wrt ^elyse^'s issue, I guess it's because .keys is lazy? arguably surprising | 18:51 | |
TimToady | or at least the type specializer should be able to deal with it, where we have to delay the decision | ||
grondilu | m: { (.min + .max)*.elems div 2 }(1..100) == [+] 1.. 100 | 18:52 | |
camelia | rakudo-moar de4b2b: OUTPUT«WARNINGS:Useless use of "==" in expression "(1..100) == [+] 1.. 100" in sink context (line 1)» | ||
grondilu | m: say { (.min + .max)*.elems div 2 }(1..100) == [+] 1.. 100 | ||
camelia | rakudo-moar de4b2b: OUTPUT«True» | ||
TimToady | not quite | ||
grondilu | ? | ||
TimToady | m: say { (.min + .max)*.elems div 2 }(1..^100) == [+] 1..^100 | ||
camelia | rakudo-moar de4b2b: OUTPUT«False» | ||
lizmat | ^elyse^: afaik, .keys takes a snapshot | ||
grondilu | m: say (1..^100).max; | 18:53 | |
camelia | rakudo-moar de4b2b: OUTPUT«100» | ||
grondilu is confused | |||
vendethiel | m: my %h = a => 1, b => 2; for %h.keys { .say; %h{"Foo$_"} = 5; }; say %h; | ||
camelia | rakudo-moar de4b2b: OUTPUT«abFooa => 5, Foob => 5, a => 1, b => 2» | ||
TimToady | it's an interval, not a list | ||
^elyse^ | lizmat: appears not to for me | ||
lizmat | m: my %h = a => 42; my $s = "b"; for %h.kv -> \k, \v { say k,v; %h{$s++} = 42 } | ||
camelia | rakudo-moar de4b2b: OUTPUT«a42» | ||
lizmat | m: my %h = a => 42; my $s = "b"; for %h.kv -> \k, \v { say k,v; %h{$s++} = 42 }; dd %h | 18:54 | |
camelia | rakudo-moar de4b2b: OUTPUT«a42Hash %h = {:a(42), :b(42)}» | ||
lizmat | m: say (1..^100) .max; | ||
camelia | rakudo-moar de4b2b: OUTPUT«100» | ||
18:55
softmoth joined
|
|||
lizmat | m: say (42..^100) .max; | 18:55 | |
camelia | rakudo-moar de4b2b: OUTPUT«100» | ||
18:55
Hor|zon joined
|
|||
lizmat | m: say (1..^100).excludes-max; | 18:55 | |
camelia | rakudo-moar de4b2b: OUTPUT«True» | ||
lizmat | grondilu: ^^^ | ||
18:55
dj_goku joined
|
|||
grondilu | m: say max 1..^100 | 18:55 | |
camelia | rakudo-moar de4b2b: OUTPUT«99» | ||
grondilu | :/ | 18:56 | |
looks LTA | |||
lizmat | m: say (42..^100).list.max; | ||
camelia | rakudo-moar de4b2b: OUTPUT«99» | ||
TimToady | m: say (1..^100000000000).elems | ||
camelia | rakudo-moar de4b2b: OUTPUT«99999999999» | ||
leedo | btw i did confirm the slowdown happened with 2275f64e2e447c86c7d3a5804891e5120f4eb212 on Oct 9 | ||
TimToady | the logic is already in .elems | ||
grondilu | still caling it max then seems unfortunate. maybe up/down? | 18:58 | |
lizmat | grondilu: max is the name of the Range attribute | ||
grondilu | ok, fine. | ||
TimToady | well, max is emphatically not 99 | ||
18:58
Akagi201 joined
|
|||
lizmat | TimToady: suggestions for rename / deprecation welcome :-) | 18:59 | |
TimToady | max is 100 - ϵ | ||
but we don't have a way to represent that | |||
moritz | so 100 is the supremum | ||
but only if it's exclusive | |||
TimToady | it's the max, but we exclude it :) | 19:00 | |
19:00
Peter_R joined
|
|||
grondilu | I see you want to see it as a real open interval, but if so [+] $range would not make sense. | 19:00 | |
lizmat | grondilu: fwiw, that's because we use Ranges for many things | ||
TimToady | well, that's because if you use a Range as a list, we turn it into one | 19:01 | |
lizmat | at one point I implemented a IntRange (or was it RangeInt) to make the distinction clearer | ||
n0tjack | how do I apply a function to its fixed point? | ||
lizmat | but that was considered a bad idea, and hence removed | ||
n0tjack | as in, is there a way to say f(f(f(f(x)))) as foo(f,4,x) in some way? | ||
TimToady | n0tjack: keep it clean, this is a family-friendly channel | 19:02 | |
grondilu | ([o] f xx 4)(x) | ||
n0tjack | grondilu: Oh damn, that's neat | 19:03 | |
grondilu: is there some way to say "keep doing it til the output matches the input"? | |||
grondilu suspects &[o] is a cool new feature with whom lots of nice things can be done. | |||
TimToady | or [∘] if you wanna be more high-falutin' | ||
19:03
Akagi201 left
|
|||
PerlJam | don't you need &f in that so that it's not a call | 19:03 | |
grondilu | n0tjack: probably with first and [\o] | ||
TimToady | well, I suspect ∘ will break if you push it too hard, since we're not heavily into left-to-right currying as, say, Haskell is | 19:04 | |
grondilu | first *.(x) == x, [\o] f xx * | ||
n0tjack | grondilu: that just gives me intermediate ouputs, right? what I want is perl to inspect the output of each f and stop o'ing when its output matches its input | ||
grondilu | hum | ||
first :by(*.(x) == x), [\o] f xx * | 19:05 | ||
wait no | |||
first :by(*.(x) == x), [\o] f xx * # gives you the function | |||
not the output | |||
sorry | |||
first *.(x) == x, [\o] f xx * # gives you the function | |||
give us a converging function as an example maybe | 19:06 | ||
TimToady | that's gotta hurt if you miss the swimming pool | ||
n0tjack | grondilu: cosine | 19:07 | |
grondilu | for what $x? | ||
n0tjack | pi | ||
grondilu | need to use approximation instead of == though | 19:08 | |
n0tjack | yep | ||
I can try finding an exact converging function | |||
grondilu | m: say first -> &f { abs(f(pi) - pi) < 0.01 }, [\o] &cos xx * | ||
camelia | rakudo-moar de4b2b: OUTPUT«(timeout)» | 19:09 | |
grondilu | well that did not go too well | ||
FROGGS | lizmat++ # weekly | ||
TimToady | um, cos can never == pi | 19:13 | |
grondilu | lol | ||
TimToady | can't go over 1 | ||
n0tjack | TimToady: no, the input is pi | ||
grondilu | so true | ||
n0tjack | and the convergence point is .739085 or so | 19:14 | |
19:14
ponpon is now known as ponbiki
|
|||
n0tjack | converges to 6 decimals at about 10 applications of POSIX cos() | 19:14 | |
grondilu | yeah so what you want is to stop the iteration when it becomes stable | ||
n0tjack | ues | ||
flussence | but abs(cos(cos(...(pi))) - pi) will never equal less than 2 or so | 19:15 | |
grondilu | pi, &cos ... * == * | ||
TimToady | are you wanting to compare with the previous value instead? | ||
n0tjack | yes, that's what I mean by fixed point | ||
TimToady | yeah, like that | ||
grondilu | say .[*-1] given pi, &cos ... { abs($^a - $^b) < 0.01 } | 19:16 | |
m: say .[*-1] given pi, &cos ... { abs($^a - $^b) < 0.01 } | |||
camelia | rakudo-moar de4b2b: OUTPUT«0.735604740436347» | ||
grondilu | m: say .[*-1] given pi, &cos ... { abs($^a - $^b) < 0.0001 } | ||
camelia | rakudo-moar de4b2b: OUTPUT«0.739054790746917» | ||
vendethiel | m: sub infix:<+>($a, $b, *%h) { say %h }; 3 + 4 :imprecise; # ^elyse^ | ||
camelia | rakudo-moar de4b2b: OUTPUT«imprecise => True» | ||
^elyse^ | cool | ||
n0tjack | TimToady: when I said "its input matches its output", the referent of "it" was "the current invocation of the function" | ||
TimToady | I was speakin' to grondulu mostly | 19:17 | |
n0tjack | ah | ||
TimToady | er, *grondilu | ||
n0tjack sheepishly goes back to trying to learn a one-handed swing cut | 19:18 | ||
grondilu still wonders if he can get the same result with [o] | 19:19 | ||
grondilu concludes using a sequence is simple enough. | 19:20 | ||
n0tjack | at least I'm getting really good at 52 pickup | ||
lizmat wonders whether it would make sense to create a Seq.sort that would binary chop building a list, rather than first need to create a whole list | |||
flussence | m: sub infix:<≈>(\a, \b, Numeric :$ϵ = 1e-6) { abs(a - b) < $ϵ }; say pi ≈ 22/7 :ϵ(1e-2) | 19:21 | |
camelia | rakudo-moar de4b2b: OUTPUT«True» | ||
19:22
domidumont left
|
|||
grondilu would not be displeased to have something like that in the core. | 19:22 | ||
TimToady | n0tjack: planning to fool Penn & Teller? | ||
19:23
kjs_ joined
|
|||
n0tjack | TimToady: I may or may not have spent Sunday morning fantasizing about doing just that | 19:23 | |
19:23
adhoc left
|
|||
konobi | TimToady: so... the dtrace folks are a nice helpful group. I think it'd be great for perl6 to have dtrace, both in terms of user usage as well as developer usage | 19:29 | |
19:30
kjs_ left
|
|||
flussence notes that «perl6 -e 'while prompt(q{> }) -> $_ { say .EVAL.gist }'» starts up 5 seconds faster than the built in repl and is almost as functional... | 19:30 | ||
konobi | TimToady: if you're not sure as to the usefulness, i could dig up some info | 19:31 | |
TimToady | not really my decision :) | ||
19:31
CIAvash left
|
|||
moritz | konobi: dtrace is freebsd, right? | 19:31 | |
TimToady is just the BDFL, with no guarantees of competence at anything | |||
konobi | dtrace is freebsd, solaris, illumos and OSX | 19:32 | |
moritz | ah, OS X too; I didn't know | ||
konobi | there's even some support in a linux distro or two | ||
moritz | I'm pretty sure unobstrusive patches will be accepted | ||
konobi | it's a smidge more involved, since it would also affect how the build happens | 19:33 | |
^elyse^ | can I instruct sprintf to use %f but with more digits after the decimal point? | ||
moritz | m: printf '%.10f', pi | 19:34 | |
camelia | rakudo-moar de4b2b: OUTPUT«3.1415926536» | ||
konobi | moritz: for example... brendangregg.com/blog/2015-03-10/fr...raphs.html | ||
^elyse^ | moritz: :D | ||
moritz | ^elyse^: was that not what you were after? | 19:35 | |
konobi: am I right in assuming that support would need to go into MoarVM? | 19:36 | ||
^elyse^ | yes, it was. | ||
my second real Perl 6 program: gist.github.com/rightfold/e683ff5da9e4895ac7fb :) | |||
jdv79 | iirc last time i looked dtrace was not supported on linux | 19:37 | |
that's a pretty big target OS to lack support in | |||
19:38
tokuhirom_ joined
|
|||
n0tjack | ^elyse^: love the flying chevron | 19:38 | |
^elyse^ | :P | ||
carefully sorted by length | 19:39 | ||
TimToady | but it's missing the entry for 1 | ||
PerlJam | ^elyse^: me too (though I would have probably stuck _ in the numbers) | ||
^elyse^ | wish I could use Duration instead of Real, though | ||
but Duration isn't precise enough to represent yoctoseconds | |||
TimToady | need some of them 128-bit floaters... | 19:41 | |
19:41
moznion left
|
|||
hoelzro | was the kill($signal, $pid) builtin ever brought over from Perl 5? or is it just NYI and unroasted? | 19:41 | |
19:42
PsuzeannePsy left
|
|||
TimToady | I guess it's already got the entry for 1 second etc | 19:43 | |
hoelzro: it's pretty trivial to call via NativeCall | |||
hoelzro | true, I was just wondering if it'll be entering CORE | 19:44 | |
PerlJam | Proc::Async has a kill() method | ||
vendethiel | m: class A { method foo(:U self:){} }; | 19:45 | |
camelia | rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/n_wTivDIBKMissing blockat /tmp/n_wTivDIBK:1------> 3class A { method foo(:7⏏5U self:){} };» | ||
vendethiel | m: class A { method foo(:U self:) {} }; | ||
camelia | rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UR9FzQWauAMissing blockat /tmp/UR9FzQWauA:1------> 3class A { method foo(:7⏏5U self:) {} };» | ||
vendethiel | m: class A { method foo(:U:) {} }; | ||
camelia | rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rnbhkGkURnMissing blockat /tmp/rnbhkGkURn:1------> 3class A { method foo(:7⏏5U:) {} };» | ||
vendethiel | m: class A { method foo(Any:U:) {} }; | 19:46 | |
camelia | ( no output ) | ||
vendethiel | m: class A { method foo($?CLASS:U:) {} };#can it use this? | ||
camelia | rakudo-moar de4b2b: OUTPUT«5===SORRY!5===In signature parameter $?CLASS, it is illegal to use the ? twigilat /tmp/DIi0SG38Z_:1------> 3class A { method foo($?CLASS7⏏5:U:) {} };#can it use this?Invalid typename 'U' in parameter declaration.at /tmp/DIi0SG38Z_:…» | ||
19:47
adhoc joined,
moznion joined
|
|||
konobi | moritz: in can go into moarvm and rakudo | 19:47 | |
n0tjack | what's the syntax for instantiating a hash from two arrays (one for keys, other for vals)? | ||
hoelzro | PerlJam: right, but that's only for processes you create yourself | ||
TimToady | n0tjack: two common ways | 19:48 | |
19:48
virtualsue joined
|
|||
TimToady | %hash{@keys} = {@values} | 19:48 | |
19:48
llfourn joined
|
|||
TimToady | %has = @keys Z=> @values | 19:48 | |
n0tjack | ah, Z is what I was looking for | ||
I used X and of course that didn't work | |||
^elyse^ | Typo causes line-up, so +1 | ||
TimToady | bare Z also works | ||
or wait, no it doesn't | |||
not since GLR :) | |||
%hash = flat @keys Z @values would work though | 19:49 | ||
n0tjack | TimToady: Z=> is good enough for moi | ||
is there a function for "shift in"? | 19:50 | ||
as in 99 magic (1,2,3,4,5) becomes (99,1,2,3,4)? | 19:51 | ||
same length, but end drops off and first element becomes the new guy | |||
hoelzro | ab5tract_: to answer your question from 10 days ago (re: Linenoise + Windows), yes | ||
^elyse^ | m: my @xs = 1, 2, 3; @xs.unshift 99; @xs.pop; @xs.say | 19:52 | |
camelia | rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mc16mNTgmtTwo terms in a rowat /tmp/mc16mNTgmt:1------> 3my @xs = 1, 2, 3; @xs.unshift7⏏5 99; @xs.pop; @xs.say expecting any of: infix infix stopper statement …» | ||
^elyse^ | m: my @xs = 1, 2, 3; @xs.unshift(99); @xs.pop; @xs.say | ||
camelia | rakudo-moar de4b2b: OUTPUT«[99 1 2]» | ||
n0tjack | ^elyse^: yeah, that's more or less what I did | ||
hoelzro | I still have not managed to get a working dev env on Windows for Rakudo =/ | ||
flussence | m: say 0.000000000000000000000000000000001.nude | ||
camelia | rakudo-moar de4b2b: OUTPUT«(1 999999999999999945575230987042816)» | ||
hoelzro | after trying VS2013, VS2015, and Mingw | ||
konobi | moritz: i also have the dtrace inventor on my contact list, should there be questions =0) | 19:53 | |
^elyse^ | m: my @xs = 1, 2, 3; {.unshift(99); .pop} given @xs; @xs.say | ||
camelia | rakudo-moar de4b2b: OUTPUT«[99 1 2]» | ||
moritz | konobi: fwiw I don't know much about a dtrace, the demos I've seen were pretty cool | ||
19:54
llfourn left
|
|||
moritz | konobi: so despite not being on a platform where it's supported, I'm in favour -- as long as it's not too big a burden on the mainters | 19:54 | |
*maintainers | |||
19:54
FROGGS left
|
|||
moritz | konobi: and I don't maintain the low-level code, so I don't have much say in that matter | 19:54 | |
PerlJam | m: my @xs = 1, 2, 3; @xs.=rotate(-1).[0]=99; @xs.say; | 19:55 | |
camelia | rakudo-moar de4b2b: OUTPUT«[99 1 2]» | ||
konobi | moritz: yeah... at least there's some experience around from it being implemented in perl5 | ||
jdv79 | oh, dtrace is also non-win so the usage of that "feature" may be quite limited since i believe most people are on win,lin,osx and dtrace is only on osx. | ||
just sayin | |||
konobi | jdv79: wrong | ||
i mentioned the platforms above | |||
PerlJam | ^elyse^: rotate can be your friend. | 19:56 | |
konobi | jdv79: and windows has an equivalent-ish feature too | 19:57 | |
jdv79 | ok, more power to ya. when i looked into it a few years ago linux support was not there. | ||
n0tjack | PerlJam++ | 19:58 | |
konobi | yeah, linux is still a shitshow in terms of debuggability | ||
on windows it's ETW | |||
19:59
Akagi201 joined
|
|||
flussence | .oO( the joys of Weaponized Software Licenses ) |
19:59 | |
20:01
raiph joined
20:06
amarigatachi left
20:09
darutoko left
|
|||
^elyse^ | why can't I put a newline between "x" and ".m" in "x.m"? | 20:09 | |
20:09
dalek left
|
|||
itz_stmuk | the linux dtrace support isn't that good (or wasn't a year or so back). There is systemtap on linux and probably other rewrites | 20:09 | |
flussence | x is an operator | ||
itz_stmuk | its best on solaris, freebsd and os x | ||
^elyse^ | flussence: how about "foo" and ".bar" in "foo.bar"? | 20:10 | |
flussence | foo isn't an infix operator, so that works fine | ||
PerlJam | ^elyse^: and if it doesn't, your compiler is too old. | ||
^elyse^ | no, I get an error: "Two terms in a row across lines (missing semicolon or comma?)" | ||
TimToady | your compiler is too old | 20:11 | |
^elyse^ | ok XD | ||
thanks | |||
I'll use ==> then | |||
TimToady | m: say -42 .abs | ||
camelia | rakudo-moar de4b2b: OUTPUT«42» | ||
TimToady | there, a newline | ||
20:15
Akagi201 left
|
|||
grondilu thought a backslash was required | 20:16 | ||
PerlJam | no longer | ||
grondilu | cool | 20:17 | |
using backslashes was annoying as it messes up indentation in Vim. | |||
PerlJam | grondilu: see github.com/rakudo/rakudo/commit/cb...ceec2c74de | 20:18 | |
TimToady++ for not only making the change, but for providing a highly informative commit message. | 20:19 | ||
vendethiel | m: (&defined)(Any) | ||
camelia | ( no output ) | ||
vendethiel | m: (&defined)(Nil) | 20:20 | |
camelia | ( no output ) | ||
grondilu | m: say pi . abs | 20:21 | |
camelia | rakudo-moar de4b2b: OUTPUT«3.14159265358979» | ||
vendethiel | m: say &defined.candidates | ||
camelia | rakudo-moar de4b2b: OUTPUT«(sub defined (Mu \x) { #`(Sub|50144056) ... })» | ||
20:21
Hor|zon left
|
|||
PerlJam is mildly surprised that True.abs does something | 20:22 | ||
grondilu | does that mean I can do [.]?? | ||
m: say [.] -42, abs, flip; | 20:23 | ||
camelia | rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LVHstioE1GUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/LVHstioE1G:1------> 3say [.]7⏏5 -42, abs, flip;» | ||
grondilu | yeah I thought so | ||
PerlJam | oh, that would be interesting were it allowed. | ||
vendethiel | that can't work. I'd try to call abs() | 20:24 | |
maybe a macro ;-) | |||
nine | We already have o for that | ||
vendethiel | o doesn't "dot-compose" | ||
well | |||
m: say [o] -42, *.abs, *.flip; | 20:25 | ||
camelia | rakudo-moar de4b2b: OUTPUT«Type check failed in binding <anon>; expected Callable but got Int in block <unit> at /tmp/9Dk6BDS5Ri:1» | ||
vendethiel | m: say ([o] *.abs, *.flip)(-42); | ||
camelia | rakudo-moar de4b2b: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '0324-7⏏' (indicated by 7⏏) in block <unit> at /tmp/MyCkkaY9GH:1Actually thrown at: in any at gen/moar/m-Metamodel.nqp:2864 in block <unit> a…» | ||
20:25
kaare_ left
|
|||
grondilu | flip was a bad example, use log instead | 20:25 | |
vendethiel | m: say ([o] *.abs, *.log)(-42); | ||
camelia | rakudo-moar de4b2b: OUTPUT«NaN» | ||
grondilu | m: say ([o] &abs, &log)(-42) | 20:26 | |
camelia | rakudo-moar de4b2b: OUTPUT«NaN» | ||
grondilu | abs first | ||
m: say ([o] &log, &&abs)(-42) | |||
camelia | rakudo-moar de4b2b: OUTPUT«3.73766961828337» | ||
vendethiel | ...&&abs? | ||
grondilu | (the doubling of & is a typo) | ||
vendethiel | oh | ||
just the order changed up. hehe | |||
PerlJam | m: &&&&&say("hi") | ||
camelia | rakudo-moar de4b2b: OUTPUT«hi» | ||
grondilu | not much different than my $$$$$$$$$$$$$ | 20:27 | |
PerlJam | aye. | ||
grondilu | m: say "I'm rich" given my $$$$$$$$$$$$ | ||
camelia | rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yN_Ilga_weCannot declare a variable by indirect name (use a hash instead?)at /tmp/yN_Ilga_we:1------> 3say "I'm rich" given my $$$$$$$$$$$7⏏5$» | ||
grondilu | ? | ||
std: my $$ | 20:28 | ||
camelia | std 28329a7: OUTPUT«5===SORRY!5===Cannot declare an indirect variable name at /tmp/iSdLirtp5M line 1:------> 3my $7⏏5$ expecting any of: desigilname twigilParse failedFAILED 00:00 135m» | ||
grondilu | oh | ||
flussence | std: $$$$$$$$$$$$$$$$$$ | ||
camelia | std 28329a7: OUTPUT«ok 00:00 135m» | ||
lizmat | hmmm... seems dalek is awol | 20:29 | |
et09 | the rapper dalek? | 20:30 | |
feat awol one... lol | |||
20:30
kmel joined,
PerlJam left,
masak left,
[Coke] left,
avuserow1 left,
synbot6 left,
sergot_ left,
JimmyZ left,
dalek joined,
ChanServ sets mode: +v dalek,
Util left
20:31
psch left
20:34
PerlJam joined
|
|||
PerlJam | um ... what happened to hack? | 20:34 | |
moritz | a load of about 135 | 20:35 | |
RabidGravy | poor computer | ||
20:35
synbot6 joined
|
|||
moritz | and then, when it didn't react anymore, I rebooted it, forcefully | 20:35 | |
PerlJam | moritz++ | ||
20:36
][Sno][ is now known as [Sno]
|
|||
dalek | ast: d40553a | lizmat++ | S32-list/grep-v.t: Add tests for grep :v |
20:43 | |
20:43
kmel left
20:46
nick25 joined
20:51
xfix left
|
|||
dalek | kudo/nom: 97954be | lizmat++ | t/spectest.data: Run grep :kv / :p / :v tests |
20:51 | |
20:55
gamo joined
|
|||
gamo | Hi. How do I do a swap @a[1][2] <-> @b[3][4] ? | 20:56 | |
vendethiel | github.com/rakudo/rakudo/commit/ef...4db0b6c365 ... what? can I get an explanation? doesn't that fix warrant a comment there? it's hard to understand | 20:58 | |
PerlJam | gamo: (@a[1][2], @b[3][4]) = @b[3][4], @a[1][2]; # a way | ||
vendethiel | "Definite return values are now allowed" what's that supposed to mean? | ||
gamo | ok, just as perl5 | 20:59 | |
20:59
spider-mario left
|
|||
lizmat | m: sub swap(\a,\b) { my $c = a; a = b; b = $c }; my $a = 42; my $b = 666; swap $a, $b; dd $a, $b # naive solution for gamo | 21:00 | |
camelia | rakudo-moar de4b2b: OUTPUT«Int $a = 666Int $b = 42» | ||
vendethiel | "Methods map, push, pop, shift, unshift, append, prepend now properly marked as nodal" this doesn't tell much to someone reading the changelog :P | ||
lizmat | grep nodal S99-glossary.pod # nothing :-( | 21:01 | |
PerlJam | actually, it's weird that P6 doesn't have some sort of swap built-in | ||
dalek | rl6-roast-data: 32c3a01 | coke++ | / (9 files): today (automated commit) |
||
gamo | thanks, bye! | 21:02 | |
21:04
bjz_ left
21:06
rindolf left
21:07
rurban1 joined,
roguelazer left,
roguelazer joined
21:08
rurban left
21:12
Akagi201 joined
21:16
tokuhiro_ joined
21:18
Hor|zon joined,
Akagi201 left
21:20
tokuhiro_ left,
ponzellus joined
21:22
nick25 left,
kjs_ joined
21:23
Hor|zon left,
kjs_ left
|
|||
ponzellus | hi all, I'm starting to play with perl6 but am stuck using an array as a class attribute. when pushing elements into the array, I get the error "Cannot look up attributes in a type object", anybody here who'd like to have a look? :) | 21:24 | |
I have a MWE at gist.github.com/phamer/a265d76ce94f7ea91e28 | |||
21:25
nick25 joined
|
|||
PerlJam | ponzellus: you don't have an instance of a Room | 21:27 | |
vendethiel | ponzellus: you didn't create a room | ||
n0tjack | ^elyse^: I ruined your chevron: gist.github.com/anonymous/25143c75e96f5dd54940 | ||
^elyse^ | dat code | ||
tony-o | ry @!walls.append($l) | ||
n0tjack | the only thing I'm unhappy about there is the hamfisted {@_[@pfx.elems div 2] = 1;@_} | ||
tony-o | also | 21:28 | |
^elyse^ | actually supporting femto is good | ||
more future-proof :P | |||
n0tjack | ^elyse^: The fact that femto was missing was creating a bug which drove me crazy | ||
I had no idea why my FACTORS didn't match yours -- in theory it should have ;) | 21:29 | ||
^elyse^ | :P | ||
n0tjack | if I could find a functional way to set %scales{' '} to 1, I'd be much happier | ||
PerlJam | n0tjack: ETOOCLEVER :) | 21:30 | |
n0tjack | PerlJam: Believe it or not, this kind of code/thinking/model is 100% standard in APLs | ||
an APLer who say the chevron would say "well, that's a lot of repetition" | 21:31 | ||
s/say/saw | |||
21:31
TEttinger joined
|
|||
PerlJam | I'd say that in my head too, but then the next thing would be ... "at least it's readable" | 21:31 | |
21:32
pmurias joined
|
|||
pmurias | hi | 21:32 | |
21:33
kjs_ joined,
Zoffix left,
^elyse^ left
|
|||
n0tjack | PerlJam: Well, the syntax of APLs does make the "clever" code completely transparent and straightforward in those languages. I'd argue if you read the algo in native APL vs the original chevron, you'd grok it faster, including the underlying pattern. | 21:33 | |
But array-oriented code doesn't translate super well into semicolon/curlybrace languages | |||
though p6 is much more accomodating in that regard than any other language I've seen | |||
dalek | kudo/nom: be99be3 | lizmat++ | src/core/Any-iterable-methods.pm: Fix handling of first :!k, :!p |
21:34 | |
21:34
skids left
|
|||
dalek | ast: 9b50630 | lizmat++ | S32-list/first-p.t: Add tests for first :p |
21:35 | |
21:35
kjs_ left
|
|||
ponzellus | PerlJam, vendethiel, d'oh... thank you | 21:35 | |
21:36
kjs_ joined,
nick25 left
21:37
lichtkind left
|
|||
dalek | ast: 1134319 | lizmat++ | S32-list/first-v.t: Add tests for first :v |
21:38 | |
n0tjack | d'oh! | 21:44 | |
why didn't I think of this before, much better | 21:45 | ||
gist.github.com/anonymous/5ea32acacc2aa40e1f5d | |||
1000 X** ... is much better than 10 X** 3 X* ..., and the "set the units to 1" is automagical | |||
21:45
uberbaud joined
21:46
ponzellus left
|
|||
dalek | ast: f70c498 | lizmat++ | S32-list/first-end-p.t: Add tests for first :end, :p |
21:48 | |
21:48
llfourn joined
21:50
regreg joined
21:52
mullagainn left
|
|||
dalek | ast: af18e37 | lizmat++ | S32-list/first-end- (2 files): Add tests for first :end, :v (and fix count on :p) |
21:53 | |
uberbaud | \help | ||
21:54
llfourn left
|
|||
n0tjack throws a lifering to uberbaud | 21:54 | ||
21:56
rurban1 left
21:57
uberbaud left
21:58
uberbaud joined,
kid51 joined
21:59
rurban1 joined
|
|||
dalek | ast: dcf3e06 | lizmat++ | S32-list/first-end (2 files): Add tests for first :end (and one for :end, :k) |
21:59 | |
22:03
kjs_ left
22:05
n0tjack left
|
|||
dalek | kudo/nom: 46874fd | lizmat++ | t/spectest.data: Run tests for first :end, :k, :p, :v |
22:05 | |
lizmat | Files=1062, Tests=48081, 238 wallclock secs (12.05 usr 3.86 sys + 1440.55 cusr 128.51 csys = 1584.97 CPU) | 22:06 | |
22:06
lea left
|
|||
lizmat | wonder if we're going to reach 50K before Christmas | 22:06 | |
22:09
RabidGravy left
22:10
gamo left
|
|||
lizmat | but first some sleep | 22:11 | |
so good night, #perl6! | |||
22:12
pmurias left
22:15
Akagi201 joined
|
|||
hoelzro | pass for ^2000; # done! | 22:15 | |
22:16
virtualsue_ joined,
tokuhiro_ joined
22:17
virtualsue left,
virtualsue_ is now known as virtualsue
22:19
Hor|zon joined
22:21
zakharyas joined,
tokuhiro_ left,
telex left
22:22
telex joined
22:24
Hor|zon left
22:28
tokuhirom_ left
22:29
Akagi201 left
22:30
cognominal left,
cognominal joined
22:42
Peter_R left
22:45
vendethiel left
22:47
raiph left
22:48
firstdayonthejob left
22:51
lea joined
22:57
raiph joined
23:09
virtualsue left
|
|||
uberbaud | \quit | 23:13 | |
23:13
uberbaud left
23:15
cognominal left
23:16
cognominal joined
23:19
cognominal left
|
|||
timotimo | m: my $r = / foobar /; say $r.match(" foobar "); say $r.submatch(" foobar "); | 23:19 | |
camelia | rakudo-moar 46874f: OUTPUT«Method 'match' not found for invocant of class 'Regex' in block <unit> at /tmp/wXW2csYz_o:1» | ||
timotimo | how come we don't have that? | ||
m: my $r = / foobar /; say $r.submatch(" foobar "); | 23:20 | ||
camelia | rakudo-moar 46874f: OUTPUT«Method 'submatch' not found for invocant of class 'Regex' in block <unit> at /tmp/g0JJ12ZwSZ:1» | ||
23:20
Hor|zon joined
|
|||
timotimo | and why don't we have that? really, no way to match a regex and enforce start- and end-anchoring without embedding the regex into another regex or asserting that after the match? | 23:20 | |
23:25
Hor|zon left,
BenGoldberg joined,
Akagi201 joined
23:28
tokuhirom_ joined
23:31
Akagi201 left
23:33
tokuhirom_ left
23:38
Ben_Goldberg joined
23:41
BenGoldberg left
23:45
softmoth left
23:46
salva left
23:54
regreg left
|