»ö« 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. |
|||
[Coke] | m: dir | say | 00:00 | |
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/1AH9y6GQg4:1------> 3dir | say7⏏5<EOL>Other potential difficulties: Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invoca…» | ||
[Coke] | m: dir | .say | ||
camelia | rakudo-moar 1b537b: OUTPUT«(Any)Unhandled exception: Failed to get the directory contents of '/home/camelia/True': chdir failed: Unknown system error at <unknown>:1 (/home/camelia/rakudo-inst-2/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295) from src/gen/m-CORE…» | ||
00:00
AlexDani` joined
|
|||
psch | m: dir | say() | 00:00 | |
camelia | rakudo-moar 1b537b: OUTPUT«Unhandled exception: Failed to get the directory contents of '/home/camelia/True': chdir failed: Unknown system error at <unknown>:1 (/home/camelia/rakudo-inst-2/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295) from src/gen/m-CORE.sett…» | ||
psch | m: dir() | say() | 00:01 | |
camelia | rakudo-moar 1b537b: OUTPUT«» | ||
psch | m: say | say() | ||
camelia | rakudo-moar 1b537b: OUTPUT«True» | ||
00:01
AlexDaniel left
|
|||
[Coke] | r: my $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str | 00:02 | |
camelia | rakudo-{moar,jvm} 1b537b: OUTPUT«a» | ||
psch | m: say + | say() | ||
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2dk_vm0u6_Variable '&prefix:<|>' is not declaredat /tmp/2dk_vm0u6_:1------> 3say + 7⏏5| say()» | ||
[Coke] | r: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str | ||
psch | m: say +() | say() | ||
camelia | rakudo-{moar,jvm} 1b537b: OUTPUT«a» | ||
rakudo-moar 1b537b: OUTPUT«any(0, True)» | |||
labster | m: &infix:<|>.() | 00:03 | |
camelia | ( no output ) | ||
labster | m: say &infix:<|>.() | 00:04 | |
camelia | rakudo-moar 1b537b: OUTPUT«any()» | ||
psch | m: say [|] | ||
camelia | rakudo-moar 1b537b: OUTPUT«any()» | ||
psch | m: say &[|] [|], [|] | ||
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QSEB6FQy98Preceding context expects a term, but found infix , insteadat /tmp/QSEB6FQy98:1------> 3say &[|] [|],7⏏5 [|]» | ||
psch | m: say [&[|]] [|], [|] | ||
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/U76prd4Q3CPreceding context expects a term, but found infix , insteadat /tmp/U76prd4Q3C:1------> 3say [&[|]] [|],7⏏5 [|]» | ||
psch | ehh, nevermind :) | ||
00:05
cognominal left
00:06
pecastro joined
|
|||
dalek | ast: cfc0897 | coke++ | S05-metasyntax/longest-alternative.t: Add tests for RT #113884 |
00:09 | |
00:10
Ben_Goldberg joined
|
|||
psch | implicit returns are broken on jvm :/ | 00:10 | |
00:10
Ben_Goldberg left
|
|||
psch | well, in one test file at least | 00:11 | |
r: sub f { sub g { 1 } }; my $a = f(); say $a() | |||
camelia | rakudo-jvm 1b537b: OUTPUT«java.lang.NullPointerException in block <unit> at /tmp/tmpfile:1» | ||
..rakudo-moar 1b537b: OUTPUT«1» | |||
psch | r: sub f { return sub g { 1 } }; my $a = f(); say $a() | ||
camelia | rakudo-{moar,jvm} 1b537b: OUTPUT«1» | ||
psch | actually, i guess it's the sub declaration as implicit return | 00:12 | |
00:12
BenGoldberg left
|
|||
psch | and jdb backtraces really don't help hah | 00:13 | |
00:14
BenGoldberg joined
00:15
Ben_Goldberg joined
|
|||
psch | m: sub f { $_ }; my $a = f(1); say $a | 00:16 | |
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Pek_L_ZtF5Calling f(int) will never work with declared signature ()at /tmp/Pek_L_ZtF5:1------> 3sub f { $_ }; my $a = 7⏏5f(1); say $a» | ||
psch | m: sub f { @_[0] }; my $a = f(1); say $a | ||
camelia | rakudo-moar 1b537b: OUTPUT«1» | ||
psch | m: sub f { @_[0] }; my $a = f(sub g { 1 }); say $a | ||
camelia | rakudo-moar 1b537b: OUTPUT«sub g () { #`(Sub|57502528) ... }» | ||
psch | m: sub f { @_[0] }; my $a = f(sub g { 1 }); say $a() | ||
camelia | rakudo-moar 1b537b: OUTPUT«1» | ||
psch | m: sub f { sub { @_[0] } }; my $a = f(1); say $a() | 00:17 | |
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3aglJckKZMCalling f(int) will never work with declared signature ()at /tmp/3aglJckKZM:1------> 3sub f { sub { @_[0] } }; my $a = 7⏏5f(1); say $a()» | ||
psch | m: sub f($a) { sub { $a } }; my $a = f(1); say $a() | ||
camelia | rakudo-moar 1b537b: OUTPUT«1» | ||
psch | m: sub f($a) { sub g { $a } }; my $b = f(1); say $b() | 00:18 | |
camelia | rakudo-moar 1b537b: OUTPUT«1» | ||
00:18
gfldex left
|
|||
psch | ok, i'm baffled | 00:18 | |
next test failure... | |||
actually | 00:19 | ||
habitual m: | |||
j: sub f($a) { sub g { $a } }; my $b = f(1); say $b() | |||
camelia | rakudo-jvm 1b537b: OUTPUT«java.lang.NullPointerException in block <unit> at /tmp/lPIFkZleLR:1» | ||
psch | j: sub f { sub { @_[0] } }; my $a = f(1); say $a() | ||
camelia | rakudo-jvm 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FZ4wXMzTu7Calling f(int) will never work with declared signature ()at /tmp/FZ4wXMzTu7:1------> 3sub f { sub { @_[0] } }; my $a = 7⏏5f(1); say $a()» | ||
psch | j: sub f { @_[0] }; my $a = f(sub g { 1 }); say $a | 00:20 | |
camelia | rakudo-jvm 1b537b: OUTPUT«sub g () { #`(Sub|1241353615) ... }» | ||
psch | j: sub f { @_[0] }; my $a = f(sub g { 1 }); say $a() | ||
camelia | rakudo-jvm 1b537b: OUTPUT«1» | ||
psch | j: sub f { @_[0]; { @_[0] } }; my $a = f(sub g { 1 }); say $a() | ||
camelia | rakudo-jvm 1b537b: OUTPUT«Method 'Any' not found for invocant of class 'Parcel' in block <unit> at /tmp/58Qw6DAJL3:1» | ||
psch | j: sub f { @_[0]; anon sub { @_[0] } }; my $a = f(sub g { 1 }); say $a() | ||
camelia | rakudo-jvm 1b537b: OUTPUT«(Any)» | ||
psch | j: sub f($a) { anon sub { $a } }; my $a = f(sub g { 1 }); say $a() | ||
camelia | rakudo-jvm 1b537b: OUTPUT«java.lang.NullPointerException in block <unit> at /tmp/WlK79q_M0Y:1» | ||
psch | m: my int $a is default(42); | 00:22 | |
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/T29ipfnEQoCan't use trait 'is default' on a native.at /tmp/T29ipfnEQo:1------> 3my int $a is default(42)7⏏5; expecting any of: constraint» | ||
psch | j: my int $a is default(42); | ||
camelia | ( no output ) | ||
00:26
dustinm` left
|
|||
[Coke] | m: my \\a = any set <1 2 3>; \n say 1 ~~ a | 00:29 | |
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SLdnZehN8uMalformed myat /tmp/SLdnZehN8u:1------> 3my7⏏5 \\a = any set <1 2 3>; \n say 1 ~~ a» | ||
[Coke] | m: my \a = any set <1 2 3>;  say 1 ~~ a | 00:30 | |
camelia | rakudo-moar 1b537b: OUTPUT«False» | ||
[Coke] | j: my \a = any set <1 2 3>;  say 1 ~~ a | ||
camelia | rakudo-jvm 1b537b: OUTPUT«False» | ||
skids | m: my \a = any set <1 2 3>; a.perl.say | 00:31 | |
camelia | rakudo-moar 1b537b: OUTPUT«any(set("1","3","2"))» | ||
00:32
telex left
|
|||
[Coke] | does someone have a java verison built locally? | 00:32 | |
skids | kinda maybe I'll check. | 00:33 | |
[Coke] | just realized that RT# 115270 is talkinga bout the reply. | ||
00:34
telex joined
|
|||
psch | seems to work here | 00:35 | |
gist.github.com/peschwa/11b1f3fd9921b4b7700a | |||
i don't know if i would call "0" as return value of ~~ happy, though, but that's on moar and i don't have that built atm | 00:36 | ||
skids | Yeah here too. | ||
psch | $ echo -ne "start { while true { 1 } }\n" | ./perl6-j --ll-exception # that's a line that still does something wonky | 00:39 | |
i don't remember if there was an RT | |||
00:39
leont left
|
|||
psch | r: start { while true { 1 } }\n | 00:39 | |
camelia | rakudo-{moar,jvm} 1b537b: OUTPUT«5===SORRY!5===Function true needs parens to avoid gobbling blockat /tmp/tmpfile:1------> 3start { while true { 1 }7⏏5 }\nMissing block (apparently taken by 'true')at /tmp/tmpfile:1------> 3start { while true { 1 } 7⏏5…» | ||
psch | ehh, spurious \n | ||
well, the error is still the expected one | |||
the echo line gives a NPE | 00:40 | ||
utterly weird :P | |||
labster | m: say 2 > 1 ~~ ( More or Less ) | 00:44 | |
camelia | rakudo-moar 1b537b: OUTPUT«True» | ||
labster | m: say(i before e unless i after "c") | 00:46 | |
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RyLBJuDfPkUnable to parse expression in argument list; couldn't find final ')' at /tmp/RyLBJuDfPk:1------> 3say(i before e unless 7⏏5i after "c")» | ||
labster | m: say i before e unless i after "c"; | 00:47 | |
camelia | rakudo-moar 1b537b: OUTPUT«True» | ||
psch | labster++ | ||
00:48
rindolf joined
00:57
vendethiel left
00:58
rindolf left
01:00
Ben_Goldberg left
01:03
vendethiel joined
01:06
rindolf joined
01:15
rindolf left
01:17
rmgk_ joined,
rmgk is now known as Guest99707,
rmgk_ is now known as rmgk,
Guest99707 left
01:19
atroxaper joined
01:24
atroxaper left
01:30
tinyblak_ joined
01:33
tinyblak left
|
|||
b2gills | .tell cognominal `say True.'!'()` calls a method by its name at runtime ( think `$a."$b"()` parens are required ). Currently to call a prefix operator as a method: `say True.&prefix:<!>` ( any code reference would work `$b = &say; $a.$b` ) I think? S03 should be changed to match | 01:37 | |
yoleaux | b2gills: I'll pass your message to cognominal. | ||
b2gills | TimToady: Is there a (good) reason that `$*OUT.'say': 5` doesn't parse? | 01:39 | |
m: $*OUT.'say': 5 | 01:40 | ||
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/q9yB9rpbTTQuoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.at /tmp/q9yB9rpbTT:1------> 3$*OUT.'say'7⏏5: 5» | ||
b2gills | m: $*OUT.'say'( 5 ) | ||
camelia | rakudo-moar 1b537b: OUTPUT«5» | ||
01:46
vendethiel left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:51
colomon left
01:52
colomon joined,
vendethiel joined
01:54
khw joined
01:57
colomon left
02:03
colomon joined
02:11
dayangkun joined
02:15
vendethiel left
02:17
noganex joined
02:19
noganex_ left
|
|||
kanl | is there a way to determin the type of a Range? .WHAT of bounds may be inconsistent. | 02:32 | |
m: ( -Inf .. 1 ).bounds.map: *.WHAT.say | 02:34 | ||
camelia | rakudo-moar 1b537b: OUTPUT«(Whatever)Unhandled exception: Method 'count' not found for invocant of class 'Bool' at <unknown>:1 (/home/camelia/rakudo-inst-2/share/nqp/lib/Perl6/BOOTSTRAP.moarvm::4294967295) from src/gen/m-CORE.setting:10417 (/home/camelia/rakudo-inst-2/s…» | ||
kanl | m: ( -Inf .. 1 ).bounds.map: { $_.WHAT.say }; | 02:36 | |
camelia | rakudo-moar 1b537b: OUTPUT«(Num)(Int)» | ||
kanl | m: ( 'a' .. * ).bounds.map: { $_.WHAT.say }; | ||
camelia | rakudo-moar 1b537b: OUTPUT«(Str)(Num)» | ||
kanl | m: ( 'a' .. 5 ).bounds.map: { $_.WHAT.say }; | 02:37 | |
camelia | rakudo-moar 1b537b: OUTPUT«(Str)(Int)» | ||
kanl | i suppose assuming .min.WHAT would be correct for most of the cases. and for the case of * being one of the bounds, just assume the .WHAT of another? | 02:47 | |
02:53
colomon left,
colomon joined
02:57
baest_ is now known as baest
03:03
shinobi-cl joined
03:08
[Sno] left
03:13
shinobi-cl left
03:16
nys left
03:20
aborazmeh left
03:36
atroxaper joined
03:37
khw left
03:41
dustinm` joined
03:45
vendethiel joined
03:52
davido__ joined
03:54
davido___ left
03:59
[Sno] joined
04:02
BenGoldberg left
04:07
vendethiel left
04:23
ggoebel2 joined
04:24
ggoebel left
04:25
vendethiel joined
04:42
xinming left
04:48
vendethiel left
04:56
vendethiel joined
05:01
skids left
05:07
kaare_ joined
05:13
rurban joined
05:28
rurban left
05:29
TimToady left
05:40
vendethiel left
05:42
nightfrog left
05:43
nightfrog joined
05:45
vendethiel joined
05:47
gfldex joined
05:53
diana_olhovik joined
06:01
kurahaupo left
06:04
aborazmeh joined,
aborazmeh left,
aborazmeh joined
06:07
vendethiel left
06:12
vendethiel joined
06:14
aborazmeh left
06:16
atroxaper left
06:17
atroxaper joined
06:21
TimToady joined
|
|||
TimToady | b2gills: the reason that doesn't parse is because we have to be careful when interpolating into the end of a sentence in quotes that ends with a period: "The answer is $foo." | 06:23 | |
yoleaux | 9 Jul 2015 23:43Z <[Coke]> TimToady: if we can get a ruling on RT#92742 - should enum <a b c>; c++ give c, a, or die? | ||
06:24
rurban joined
|
|||
b2gills | Fair enough | 06:25 | |
TimToady | m: enum <a b c>; say c.succ | ||
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JM6GHLIco0Undeclared routine: c used at line 1» | ||
TimToady | m: enum ABC <a b c>; say c.succ | 06:26 | |
camelia | rakudo-moar 1b537b: OUTPUT«3» | ||
TimToady | m: enum ABC <a b c>; say b.succ | ||
camelia | rakudo-moar 1b537b: OUTPUT«2» | ||
06:26
FROGGS joined
|
|||
TimToady | .tell [Coke] c++ is an error because c is a constant, but c.succ gives 3 because c is really just a name for an integer | 06:26 | |
yoleaux | TimToady: I'll pass your message to [Coke]. | ||
06:28
AlexDani` left,
rurban1 joined
|
|||
b2gills | m: class C is Int {}; C.new(4).succ.^name | 06:31 | |
camelia | ( no output ) | ||
b2gills | m: class C is Int {}; say C.new(4).succ.^name | ||
camelia | rakudo-moar 1b537b: OUTPUT«Int» | ||
06:33
vendethiel left
06:35
RabidGravy joined,
vendethiel joined
06:48
domidumont joined
06:52
domidumont left
06:53
domidumont joined
|
|||
[Tux] | test 50000 44.875 44.787 | 06:53 | |
test-t 50000 46.206 46.117 | |||
on retry even worse | |||
test 50000 47.233 47.140 | |||
test-t 50000 47.031 46.939 | |||
the system is not busy | |||
07:01
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
RabidGravy | marning! | 07:02 | |
07:02
atroxaper left
07:04
atroxaper joined
07:13
brrt joined
07:18
darutoko joined
07:19
vendethiel left
07:21
leont joined
07:40
vendethiel joined
|
|||
masak | morning, o #perl6 | 07:42 | |
07:45
amurf left
|
|||
masak | Perl 6 day! \o/ | 07:46 | |
m: class Year { has $.year; has Date $.start-date handles <is-leap-year> .= new(:$!year, :month(1), :day(1)); has Date $.end-date .= new(:$!year, :month(12), :day(31)) }; say .end-date and say .is-leap-year given Year.new(:year(2012)) | 07:49 | ||
camelia | rakudo-moar 1b537b: OUTPUT«2012-12-31True» | ||
masak | Perl 6 is awesome... | ||
nine | masak: indeed it is | 07:56 | |
moritz | m: class Year { has $.year; has Date $.start-date handles <is-leap-year> .= new(:$!year, :month(1), :day(1)); has Date $.end-date = self.start-date.later(:1year).earlier(:1day) | 07:59 | |
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VDRndcoU77Missing blockat /tmp/VDRndcoU77:1------> 3.start-date.later(:1year).earlier(:1day)7⏏5<EOL> expecting any of: postfix statement end statement modifier…» | ||
moritz | m: class Year { has $.year; has Date $.start-date handles <is-leap-year> .= new(:$!year, :month(1), :day(1)); has Date $.end-date = self.start-date.later(:1year).earlier(:1day) }; say Year.new(year => 2015).end-date | 08:00 | |
camelia | rakudo-moar 1b537b: OUTPUT«2015-12-31» | ||
08:01
rindolf joined
08:02
vendethiel left
08:06
vendethiel joined,
atroxaper left
|
|||
masak | m: class C { has $.x = $.y + 1; has $.y = $.x + 1 }; say 1; C.new; say 2 | 08:10 | |
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VHor7xneh7Virtual call $.y may not be used on partially constructed objectsat /tmp/VHor7xneh7:1------> 3class C { has $.x = $.y7⏏5 + 1; has $.y = $.x + 1 }; say 1; C.new; expecting any of:…» | ||
masak | m: class C { has $.x = $!y + 1; has $.y = $!x + 1 }; say 1; C.new; say 2 | ||
camelia | rakudo-moar 1b537b: OUTPUT«1Use of uninitialized value of type Any in numeric context in method at /tmp/70rhlVR3zt:12» | ||
masak | oh, ok :) | ||
08:12
zakharyas joined
|
|||
masak | every time I change a `say` to a `print`, I get a little bit uneasy, because I'm not always sure whether I'm also implicitly changing a .gist to .Str somewhere. | 08:17 | |
08:22
sivoais left
08:23
sivoais joined
|
|||
masak is once again reminded of the importance of finding the right method name | 08:26 | ||
08:26
atroxaper joined
|
|||
masak | just used `.allot` in some code that lays things out on a page :) | 08:26 | |
not to be confused with hyperboleandahalf.blogspot.se/2010/...thing.html | 08:27 | ||
DrForr | Or .shallot. | 08:34 | |
brrt | what is .allot | 08:35 | |
masak | brrt: similar to 'allocate', but it felt a little bit more right when talking about making room for things on a canvas | ||
brrt | aha :-) | 08:36 | |
moritz | .oO( allotace ) |
08:42 | |
08:42
huf left
08:44
huf joined
08:47
leont left
08:51
vendethiel left
08:52
atroxaper left
08:54
atroxaper joined,
araujo left
|
|||
brrt | perl6 grammars are still dark voodoo magic to me ^^ | 08:55 | |
masak | brrt: it gets better. | ||
brrt | i hope | ||
masak enjoys the new constant + heredoc niceness for the first time in actual code | |||
DrForr | github.com/drforr/perl6-ANTLR4 # may offer some inspiration. | ||
Woodi | .oO( light voodoo magic ? ) |
08:56 | |
hi #perl6 today :) | |||
08:57
vendethiel joined
08:59
araujo joined,
araujo left
|
|||
DrForr | Oh, masak - Was reading strangelyconsistent.org/blog/counti...igurations - There's a simple argument for exact cover. There are 38 hexes on the board. 38 isn't divisible by 3, so there there must be at least one length-2 piece. You can't remove a single length-3 piece because that leaves a length-1 piece, ergo they must be removed in pairs. | 09:00 | |
09:01
araujo joined
09:03
rindolf left
09:04
espadrine joined
|
|||
DrForr | Alternatively, 2x+3y=38 only has solutions for even values of y. | 09:08 | |
Woodi | jnthn: arrays 10x10x10 bytes in 1000 bytes blob cannot be more perfecter :) but there is something like en.wikipedia.org/wiki/Curse_of_dimensionality - data in arrays with high number of dimensions are sparse. but things are similiar when just one index grows in 2D or 3D - blobs can be very empty. would be nice to have other representation of native arrays, linked list or something... then blobs cou | ||
ld be converted to linked list or ... | |||
... even user could predeclare native array as specific representation. | |||
but probably this is for post-6.0... | 09:09 | ||
09:11
ab6tact joined
|
|||
masak | by the way, I have a resolution to make. | 09:12 | |
it's kind of a long-term one, with a horizon of 2020 or so. | |||
ab6tact | good *, #perl6 | ||
masak | ab6tact: \o | ||
ab6tact | masak: seems I have arrived just in time for an exciting announcement :) | ||
masak | I want to focus some of my Perl 6 work on making gorgeous graphics. | ||
like, I enjoyed making the graphics for strangelyconsistent.org/blog/youre-...-all-alike | 09:13 | ||
but it's much to cumbersome to start from scratch every time, writing scripts to generate SVG and then saving them in the right format and uploading them. | |||
ab6tact | masak: I've had a distant goal of 'write a wrapper for Processing for perl6-j' | 09:14 | |
masak | I would much prefer it if psyde (the static webpage thing I'm using) could handle making such diagrams inline in the Markdown | ||
09:14
brrt left
|
|||
masak | and at most I'd have to create a small plugin or something to handle mazes | 09:14 | |
ab6tact | oo, that does sound helpful :) | ||
masak | so, anyway, that's my goal. now you know. | ||
ab6tact | m: Date.new(:1999year).prev.say | 09:15 | |
camelia | rakudo-moar 1b537b: OUTPUT«Method 'prev' not found for invocant of class 'Date' in block <unit> at /tmp/oHEZhEkSmF:1» | ||
ab6tact | masak: is that expected? It seems weird that Date would have that behavior (can't get .prev from the first of a year) and makes getting the date behavior in overlaps-with trickty | 09:16 | |
masak | m: say Date.new(:year(1999)) | ||
camelia | rakudo-moar 1b537b: OUTPUT«1999-01-01» | ||
ab6tact | m: Date.new(:1999year).succ.say | ||
camelia | rakudo-moar 1b537b: OUTPUT«1999-01-02» | ||
masak | ab6tact: could it be that .prev is simply missing on Date? | ||
ab6tact | m: Date.new(:1999year).succ.prev.say | ||
camelia | rakudo-moar 1b537b: OUTPUT«Method 'prev' not found for invocant of class 'Date' in block <unit> at /tmp/cqBWiGWkUN:1» | ||
ab6tact | wha? that's weird! | ||
ShimmerFairy | m: Date.new(:1999year).pred.say | 09:17 | |
camelia | rakudo-moar 1b537b: OUTPUT«1998-12-31» | ||
ab6tact | p6doc -f pre returns Range.prev :/ | ||
*prev | |||
ShimmerFairy | Isn't it usually .pred ? | ||
ab6tact | ahgads | ||
masak | ah, there ya go :) | ||
we oughta have Levenshtein for that... :) | |||
ab6tact | that'll fix. thanks ShimmerFairy | ||
masak: well, when I grow up I hope to write a 'use no-shortforms' schema, and banish all abbreviations to the compile time error bin ;) | 09:18 | ||
ShimmerFairy | pred/succ are shortforms? | 09:19 | |
ab6tact | predecessor / successor | ||
masak .oO( previous / succious ) | |||
ShimmerFairy | Do we really have those as methods though O_o ? | ||
ab6tact | maybe 'no-abbreviations' is a better name for the schema | 09:20 | |
masak | 'no-abbrs' | ||
:P | |||
ab6tact | jesus, s/schema/pragma/ | ||
was up late last night :P | |||
masak | s/pragma/stigma/ | ||
s/stigma/zeugma/ | |||
...what is this, Friday? :P | |||
ab6tact | hehe | ||
ShimmerFairy wonders if use no-* wouldn't be better written as no * :P | |||
masak | m: no zeugma; | 09:21 | |
camelia | rakudo-moar 1b537b: OUTPUT«===SORRY!===Don't know how to 'no zeugma' just yet» | ||
ab6tact | :) | ||
masak | m: no everything; | ||
camelia | rakudo-moar 1b537b: OUTPUT«===SORRY!===Don't know how to 'no everything' just yet» | ||
ab6tact | but I imagined that to be a 'negatiing pragma' form.. the abbreviations are not brought in by 'use abbrevs;' ,so 'no abbrevs' would be weird | 09:22 | |
masak | m: no your-mom; | ||
camelia | rakudo-moar 1b537b: OUTPUT«===SORRY!===Don't know how to 'no your-mom' just yet» | ||
ab6tact | m: Date.new('1999-01-02').prev | ||
camelia | rakudo-moar 1b537b: OUTPUT«Method 'prev' not found for invocant of class 'Date' in block <unit> at /tmp/nnrLtlLXBE:1» | ||
masak | it's .pred | 09:23 | |
m: Date.new('1999-01-02').pred | |||
camelia | ( no output ) | ||
masak | m: say Date.new('1999-01-02').pred | ||
camelia | rakudo-moar 1b537b: OUTPUT«1999-01-01» | ||
ab6tact | that is so bizarre.. I guess the docs are wrong, because p6doc -f pre returns info about "method prev(Date:D:) return Date:D" | ||
ShimmerFairy | That'd be a typo then, I'd imagine. | ||
masak | ab6tact: ooh! plz to fix! | ||
++ab6tact | |||
ab6tact | ohhh... that's why I keep spelling 'prev' wrong.. DAMN YOU APPLE AUTOCOMPLETE | ||
DrForr | I'm just a girl who can't spell n.. n... DAMNIT. | 09:24 | |
09:24
telex left
|
|||
ab6tact | \o/ | 09:25 | |
overlaps-with now only needs special casing for the infinite forms | 09:26 | ||
09:26
telex joined
|
|||
ab6tact | .tell kanl checking only one side of the bounds won't work for determining the "type" of the range | 09:26 | |
yoleaux | ab6tact: I'll pass your message to kanl. | ||
ab6tact | I did something like | ||
09:27
cognominal joined
|
|||
ab6tact | my @types = $range.bounds: .WHAT; | 09:27 | |
and then did some grepping and some such | |||
.tell kanl checking only one side of the boundary _will_ work if !$range.infinite | 09:28 | ||
yoleaux | ab6tact: I'll pass your message to kanl. | ||
09:34
amurf joined
09:35
virtualsue joined
|
|||
dalek | c: 3bbbb81 | ab5tract++ | lib/Type/Date.pod: It is .pred, not .prev |
09:36 | |
09:36
bin_005 joined
|
|||
masak | ab6tact++ | 09:36 | |
09:36
haroldwu left
09:37
haroldwu joined
09:38
rindolf joined
09:39
dayangkun left,
amurf left
09:42
teodozjan joined
|
|||
teodozjan | p6: Array[Str].new("ABCD") Z Array[Str].new("||") | 09:43 | |
camelia | ( no output ) | ||
dalek | ast: d6fe98b | lizmat++ | S32-array/splice.t: Add todo test for typecheck failure Somehow somewhere in the throw-like internals, we get a different typecheck failure than the one we expect :-( |
09:44 | |
c: cf9ad41 | (Steve Mynott)++ | lib/Type/Proc.pod: fix minor typos |
|||
teodozjan | p6: (Array[Str].new("ABCD") Z Array[Str].new("||")).join(".").perl | 09:48 | |
camelia | ( no output ) | ||
teodozjan | p6: say (Array[Str].new("ABCD") Z Array[Str].new("||")).join(".").perl | ||
camelia | rakudo-moar 1b537b: OUTPUT«"ABCD ||"» | ||
RabidGravy | supermarket! | 09:53 | |
itz__ | beer section? | 09:54 | |
09:57
RabidGravy left
10:05
aborazmeh left
10:07
g4 joined,
g4 left,
g4 joined
10:08
teodozjan left
10:10
teodozjan joined
10:15
woolfy joined,
woolfy left
|
|||
masak | m: class C { has $.x is required }; C.new | 10:16 | |
camelia | rakudo-moar 1b537b: OUTPUT«The attribute '$!x' is required, but you did not provide a value for it. in block <unit> at /tmp/ZgjCxliD7R:1» | ||
masak | by the way, why is that block called '<unit>'? could we call it something else, like '<mainline>'? | 10:17 | |
it feels odd to use '<unit>' when we haven't declared something with the `unit` keyword. | |||
teodozjan | hi, please someone review perl6/form pull requests i didn't know that one waits for 25days and uploaded similar solution to Paul | 10:18 | |
itz__ | virtualsue: github.com/retupmoca/P6-UUID/ | 10:19 | |
moritz | teodozjan: fwiw you can push directly to perl6/form (and most other repos in the perl6/ org) | 10:20 | |
dalek | kudo/nom: ae32e12 | lizmat++ | src/core/List.pm: Add one more Int coercer, just in case |
||
masak | getting a review of one's PR might still be nice, though. | ||
moritz | aye | ||
just sayin' | |||
masak | *nod* | 10:21 | |
it's useful to know one has commit access :> | |||
or push access, rather. | |||
virtualsue | itz__: thanks | ||
teodozjan | I ddin't know that i can push but not merge :) | 10:22 | |
10:22
cschwenz joined
|
|||
cschwenz | o/ #perl6 | 10:23 | |
masak | cschwenz: \o | ||
cschwenz | Where would I report a warning being generated in Panda::Builder? | ||
masak | here :) | ||
cschwenz | Use of Nil in numeric context in block at lib/Panda/Builder.pm:125 | ||
i'm seeing that a lot during a clean build of Task::Star | 10:24 | ||
masak | it's this one: github.com/tadzik/panda/blob/maste...er.pm#L125 | ||
teodozjan | @masak could You please merge it for last time then? | ||
masak | ok. | 10:25 | |
done. | |||
teodozjan | thanks, now it will pass tests :-) | 10:26 | |
masak | \o/ | ||
cdc | Hello #perl | 10:29 | |
*#perl6 | |||
masak | \o | ||
masak .oO( nothing wrong with #perl... just ain't us ) :P | 10:30 | ||
cdc | m: Blob.new(0xff, 0xff).decode; CATCH { .WHAT.say } | ||
camelia | rakudo-moar 1b537b: OUTPUT«(X::AdHoc)Malformed UTF-8 at line 1 col 1 in block <unit> at /tmp/tn3MAgXTii:1» | ||
cdc | I was looking to get a X::Malformed::UTF-8 instead of X::AdHoc | ||
but it appears it comes from MoarVM | |||
and there's not a lot of typed exceptions emitted from MoarVM | 10:31 | ||
so, is this a good idea or not? | |||
dalek | kudo/nom: fadca9d | lizmat++ | lib/Test.pm: Don't let the feedback on a failed test explode |
||
lizmat | afk& | 10:32 | |
cdc | (from MoarVM/src/strings/utf8.c) | ||
hum, never mind, I'll use "$str = try Blob.new(...).decode" instead. | 10:38 | ||
10:38
TEttinger left
|
|||
cdc | it's even better in my case since I don't really care why Blob.decode fails | 10:39 | |
itz__ | cschwenz: are you on OS X? | 10:44 | |
cschwenz | yep :-) | ||
itz__ | rt.perl.org/Ticket/Display.html?id=125516 | 10:46 | |
cschwenz | I also ran into MoarVM spinning its wheels when compiling SVG::Plot. ^C and re-running resulted in SVG::Plot compiling and Task::Star eventually finishing successfully. | 10:48 | |
kanl | gurus, how should i define/overload postcircumfix:<[]> ? | ||
yoleaux | 09:26Z <ab6tact> kanl: checking only one side of the bounds won't work for determining the "type" of the range | ||
09:28Z <ab6tact> kanl: checking only one side of the boundary _will_ work if !$range.infinite | |||
kanl | m: class Node { has ( $.Str, @.list ); submethod BUILD( :$node ) { @!list = ( $!Str = $node ).comb: / \D+ | \d+ / } method postcircumfix:<[]>( *@i ) { @!list[@i] } }; my $a = Node.new( :node<abc000> ); say $a[0]; | ||
camelia | rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ilehdBeM9IStrange text after block (missing semicolon or comma?)at /tmp/ilehdBeM9I:1------> 3 ( $!Str = $node ).comb: / \D+ | \d+ / }7⏏5 method postcircumfix:<[]>( *@i ) { @!li expecting an…» | ||
masak | kanl: I think postcircumfix:<[]> is a sub these days. | 10:49 | |
kanl | m: class Node { has ( $.Str, @.list ); submethod BUILD( :$node ) { @!list = ( $!Str = $node ).comb: / \D+ | \d+ / }; method postcircumfix:<[]>( *@i ) { @!list[@i] } }; my $a = Node.new( :node<abc000> ); say $a[0]; | ||
camelia | rakudo-moar 1b537b: OUTPUT«Node.new(Str => "abc000", list => ["abc", "000"]<>)» | ||
masak | kanl: if I were you, I'd find some nice example in the spectest suite. | ||
kanl | oh. alright. do you happen to have a link handy? thanks~ | 10:50 | |
masak | looking now. I might be missing something, but there don't seem to be tests for this :/ | 10:52 | |
I've found a few `method postcircumfix:<{ }>` ones. | |||
10:54
atroxaper left,
xnrand joined
10:55
user3 joined
|
|||
kanl | that can help me monkeying after too, i suppose. what i don't understand with the example i posted is that the syntax seems ok ( compiler didn't complain ) but clearly not DWIM .. | 10:55 | |
masak | kanl: try this instead: `Node does Positional`, and then define the method `AT-POS` | 10:56 | |
kanl: I think that's better than directly overloading .[] | |||
10:56
user3 left
|
|||
kanl | masak: thanks, will give it a try | 10:57 | |
10:57
virtualsue_ joined
|
|||
kanl | that aside, would the thing i posted be indicating a bug, or just a NYI feature? | 10:58 | |
masak | doesn't look wrong to me at first blush. | ||
but these things are not NYI either. | |||
jnthn | If you implement the .AT-POS method, you get the various postcircumfix:<[ ]> forms "for free", as they all call your .AT-POS | ||
yoleaux | 9 Jul 2015 22:31Z <RabidGravy> jnthn: that it seems that the rt.perl.org/Ticket/Display.html?id=125408 has gone away at 2015.06-226-g01a60df built on MoarVM version 2015.06-88-g647df11 | ||
9 Jul 2015 22:56Z <TimToady> jnthn: "to implementing through implementing"? | |||
9 Jul 2015 23:55Z <[Coke]> jnthn: I bet RT #107204 is closable with tests after your nfg work. | |||
10:59
virtualsue left
|
|||
kanl | jnthn: will do. thanks. | 10:59 | |
10:59
virtualsue_ is now known as virtualsue
|
|||
masak | are we likely to get rid of Rakudo's Perl 5 dependencies before Christmas? (guessing "no".) | 11:00 | |
jnthn | masak: As in, Configure.pl? | 11:01 | |
masak | yes, mainly. | ||
and for nqp too, I guess. | |||
jnthn | I'd say "no" | ||
masak | yeah, thought so. | ||
maybe a reasonable goal for somewhat later, though? | |||
jnthn | If nothing else, because we should try to do things that will create the best experience for those trying out Perl 6 | 11:02 | |
And I imagine we could spend the time that'd take on more worthy things. | |||
Oh, eventually for sure. | |||
11:02
Begi joined
|
|||
Begi | Hey ! How can I get the most important value of an @array ? Is there a special function ? Thanks | 11:04 | |
moritz | Begi: what's the most important value? | ||
masak | haha | ||
moritz | "it's called .[]; you just have to feed it your definition of 'most important'" | 11:05 | |
jnthn suspects a translate-o :) | |||
masak | Begi: largest? smallest? largest absolute value? funniest? | ||
jnthn | m: my @a = 1,5,3,10,7; say @a.max # if largest | ||
camelia | rakudo-moar fadca9: OUTPUT«10» | ||
masak | jnthn++ beat me to it | 11:06 | |
Begi | Yes, largest | ||
jnthn | .tell TimToady fixed, thanks! | ||
yoleaux | jnthn: I'll pass your message to TimToady. | ||
moritz | m: sub importance($x) { abs($x - 5) }; say (1, 2, 4, 8, 10).max(&importance) | ||
camelia | rakudo-moar fadca9: OUTPUT«10» | ||
moritz | m: sub importance($x) { abs($x - 5) }; say (1, 2, 4, 8, 10).min(&importance) | 11:07 | |
camelia | rakudo-moar fadca9: OUTPUT«4» | ||
Begi | It works, thanks ! Do this function is in the documentation ? | 11:08 | |
moritz | doc.perl6.org/routine/max | 11:13 | |
huh, only for Range | |||
11:14
bin_005 left
11:15
rindolf left
|
|||
Begi | I didn't found it... | 11:20 | |
11:24
gcole joined
11:25
cschwenz left
|
|||
dalek | p: f847e7b | jnthn++ | src/vm/jvm/QAST/Compiler.nqp: Map multi-dim ops for JVM backend. None of them are yet implemented, but this is enough to get the test file to compile. |
11:35 | |
11:38
rurban left
11:42
brrt joined
11:43
rurban joined
|
|||
dalek | p: 4b6c325 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SixModelObject.java: Extend JVM REPR API with multi-dim functions. |
11:45 | |
masak | I'm pretty happy with github.com/perl6/specs/commit/5f132abb41 -- jnthn++ -- especially the way it's based on actual usage. | 11:49 | |
colomon | +1 | 11:50 | |
jnthn | :) | ||
masak | but (a) I have *never* set $_ manually and then done `when` stuff, so I'm pretty surprised about that usage :) | ||
and (b) I have *never* nested `when`s, so I'm pretty surprised about that usage :) | |||
(it does make sense, and I'll even consider (b) in the future) | |||
jnthn | masak: On (a), nor had I, and I'm not sure it's a pattern I'd use, but in a sense there's nothing wrong with it. | ||
colomon | Yeah, (b) seems like a great idea | ||
jnthn | And on (b), I think it can clean things up a good bit in some cases. | 11:51 | |
masak | yeah. | ||
I don't know of any other language that allows that. | |||
DrForr | m::2<_01>+1 | ||
m: :2<_01>+1 | |||
camelia | rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Wverya0d6iMalformed radix numberat /tmp/Wverya0d6i:1------> 3:2<7⏏5_01>+1 expecting any of: number in radix notation» | ||
11:51
abraxxa joined
|
|||
DrForr | ^^^ bug? Inasmuch as :2<0_1> is allowed. 0b_01 works in p5. | 11:51 | |
masak | I think the rule is that _ must occur between digits. | 11:52 | |
m: say 100__000 | |||
camelia | rakudo-moar fadca9: OUTPUT«5===SORRY!5===Only isolated underscores are allowed inside numbersat /tmp/EtvHVgMJ1w:1------> 3say 1007⏏5__000Confusedat /tmp/EtvHVgMJ1w:1------> 3say 1007⏏5__000» | ||
11:52
virtualsue left
|
|||
jnthn | m: say _100_000 # interpreted as an identifier | 11:52 | |
camelia | rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HADQEGBoPTUndeclared name: _100_000 used at line 1» | ||
11:52
brrt left
|
|||
DrForr | That's acceptable, I was wondering if it was an oversight. | 11:52 | |
masak | yeah, I think parsing _01 in there would be inconsistent. | 11:53 | |
and there's no good use for that initial _ anyway | |||
11:54
virtualsue joined
|
|||
DrForr | Agreed, there's no real use for it but they're allowed in p5. | 11:54 | |
m: :2<0_> | |||
camelia | rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Sr4RkyyTupMalformed radix numberat /tmp/Sr4RkyyTup:1------> 3:2<0_7⏏5> expecting any of: number in radix notation» | ||
DrForr | Right. | ||
masak | t/spec/S17-lowlevel/lock.t failed test 7 and then aborted here during the spectest run. | ||
not reproducible with `make t/spec/S17-lowlevel/lock.t` or `perl6 t/spec/S17-lowlevel/lock.t` | 11:55 | ||
11:55
abraxxa left,
atroxaper joined
|
|||
masak | er, `t/spec/S17-lowlevel/lock.rakudo.moar` | 11:55 | |
11:55
abraxxa joined
|
|||
FROGGS | masak: that's a test file that usually gets skipped for releases fwiw | 11:56 | |
DrForr | m: :3<0213> | 11:57 | |
camelia | rakudo-moar fadca9: OUTPUT«===SORRY!===Invalid character '3' in number literal» | ||
DrForr | Nice. | ||
Now for balanced ternary :) | |||
kanl | gurus, i'm experiencing some weirdness with eqv, and i can't quite golf it down. could someone please help me have a look at this code snipet? i'm at my wit's end with this :( | 11:58 | |
gist.github.com/anonymous/571b2a3c97a6176a6ecf | |||
11:59
atroxaper left
|
|||
kanl | i even tried to print every element out, it's like staring straight at madness | 11:59 | |
i'm fine with just using 'ne', but i still like to know why '!eqv' didn't work at expected.. | 12:00 | ||
^as | 12:01 | ||
moritz | kanl: eqv tests types as well (both from the container type and from the element types) | 12:05 | |
kanl: so you should compare .^name from both sides too, if you want to know why eqv doesn't work | 12:06 | ||
kanl | ah, i see. so it's actually comparing Int Int and Str Str and getting True for both? | ||
12:07
teodozjan left
|
|||
kanl | err, not that. i see. container. | 12:08 | |
moritz: thanks very much. | |||
12:09
AlexDani` joined
12:10
brrt joined
|
|||
kanl | m: my @a = 'abc000'.comb: / \d+ | \D+ /; my @b = 'abc001'.comb: / \d+ | \D+ /; my @i = @a.keys.grep: { @a[$_] !eqv @b[$_] }; @i.say; | 12:11 | |
camelia | rakudo-moar fadca9: OUTPUT«1» | ||
kanl | hmm. but shouldn't this golfed down form work the same way? | ||
this is behaving as expect. | 12:12 | ||
what had really made it different in the gist i posted though? | |||
now i'm really confused :/ | 12:15 | ||
12:15
kaare_ left
12:16
kaare_ joined
|
|||
timotimo | o/ | 12:19 | |
masak | \o | ||
12:20
virtualsue left
|
|||
masak | kanl: your code in the gist is too complicated for me to understand and debug. | 12:21 | |
kanl: the fact that you golfed it down and *got rid of your problem* is an indication that it's too complicated for you to understand and debug, too :P | |||
kanl: if you are unable to golf the problem down to something simpler, consider building your full solution out of simpler parts instead. | 12:22 | ||
ShimmerFairy | If you're using ne for string comparison, then you're looking for !eq , and not !eqv (since 'eq' is for string comparison like 'ne', 'eqv' is something different) | ||
masak | "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian Kernighan | 12:23 | |
ShimmerFairy: that might be it. | |||
ShimmerFairy++ | |||
kanl | ShimmerFairy: well, there are chunks that are not Str, but Int, and i just thought eqv is a generic comparison that works for both Str and Int. but you're right, and like i said, i'd be fine with 'ne'. it has the same effect i wanted. | 12:24 | |
it still doesn't explain the thing i just run in channel. | 12:25 | ||
12:25
zakharyas1 joined
|
|||
moritz | what doesn't it explain? | 12:26 | |
masak | it kinda does explain it. | ||
masak .oO( the burden of evidence that the bug reporter is not confused falls on the bug reporter ) | |||
moritz | m: my @a = 'abc', '001'; my @b = 'abc', '000'; my @i = @a.keys.grep: { @a[$_] !eqv @b[$_] }; @i.say; | 12:27 | |
camelia | rakudo-moar fadca9: OUTPUT«1» | ||
ShimmerFairy | Also, something like / \d+ | \D+ / would be more succinctly written as / .+ / , at least in the code sample you ran in the channel | ||
moritz | ShimmerFairy: no | ||
ShimmerFairy | ah, yeah, misunderstood the regex :) | ||
moritz | I don't see the problem in that snippet | ||
m: my @a = 'abc', '001'; my @b = 'abc', '000'; my @i = @a.keys.grep: { @a[$_] ne @b[$_] }; @i.say; | |||
camelia | rakudo-moar fadca9: OUTPUT«1» | ||
moritz | same result | ||
masak | you would've been right 'f't'were / [\d | \d]+ / | ||
12:28
zakharyas left
|
|||
[Coke] | TimToady: the original issue was that it int'd it at all; the request seems to be that given 'enum ABC <a b c>' that 'a++' should give 'b', not an int at all. if you disagree with that premise, then the current code is probably fine. | 12:29 | |
yoleaux | 06:26Z <TimToady> [Coke]: c++ is an error because c is a constant, but c.succ gives 3 because c is really just a name for an integer | ||
masak | [Coke]: I disagree with that premise. | 12:30 | |
[Coke]: why would `a++` make sense if `a` is an enum? | |||
m: True++ | 12:31 | ||
camelia | rakudo-moar fadca9: OUTPUT«Cannot modify an immutable Bool in block <unit> at /tmp/XlE16Z_7xd:1» | ||
moritz | a.pred, not a++ | ||
masak | not in what [Coke] said above. | ||
"...that 'a++' should give 'b'..." | |||
moritz | yes | ||
ShimmerFairy | a.succ you mean? | ||
moritz | erm, yes | 12:32 | |
just a sign error :-) | |||
dalek | pan style="color: #395be5">perl6-examples: 4123799 | paultcochrane++ | .travis.yml: Use community-supported perl6 for Travis |
||
ShimmerFairy | m: say 42++ | ||
camelia | rakudo-moar fadca9: OUTPUT«Cannot assign to an immutable value in block <unit> at /tmp/USdw6Drs4h:1» | ||
masak | physicist :P | ||
ShimmerFairy | ^ that's why a++ shouldn't work | ||
moritz | masak: *bows* | ||
masak | ShimmerFairy: well, [Coke] (correctly) pointed out that it's *not* an Int, it's an enum. | ||
moritz | it's both, no? | 12:33 | |
ShimmerFairy | masak: but why would you essentially do a += 1 ? | ||
moritz | m: enum A <a b c>; say a ~~ Int | ||
camelia | rakudo-moar fadca9: OUTPUT«True» | ||
moritz | it's an Int. | ||
m: enum A <a b c>; say a.succ | |||
camelia | rakudo-moar fadca9: OUTPUT«1» | ||
FROGGS | m: enum A <a b c>; say a.succ; a | ||
camelia | rakudo-moar fadca9: OUTPUT«1» | ||
FROGGS | m: enum A <a b c>; say a.succ; say a | 12:34 | |
camelia | rakudo-moar fadca9: OUTPUT«1a» | ||
FROGGS | m: enum A <a b c>; say a.succ; say +a | ||
camelia | rakudo-moar fadca9: OUTPUT«10» | ||
12:34
muraiki joined
|
|||
FROGGS | why would one try to modify the value of an enum? | 12:34 | |
enums are pretty constant to me | |||
12:34
Begi left
|
|||
ShimmerFairy | precisely, if you mean a.succ then don't say a++ :P | 12:34 | |
FROGGS nods | |||
[Coke] | masak,TimToady: original ticket is RT #92742 | ||
masak | oh, aha. | 12:35 | |
rt.perl.org/Ticket/Display.html?id=92742 | |||
[Coke] | the ticket is about .succ, not ++ - I took a shortcut. | ||
masak | and it has nothing to do with... right. | ||
[Coke] | which masak asked for. :P | ||
masak | it's not a shortcut that preserves semantics :) | ||
[Coke] | this is why I mentioned the ticket whenever I brought it up. :P | 12:36 | |
masak | I'm sorry, I missed that. | ||
kanl | moritz: i see where the problem is now. it's { method AT-POS( *@i ) { @!list[@i] } } | ||
i'd changed it to AT-POS( $i ) { ... } | 12:37 | ||
masak | [Coke]: the ticket expects a string back. I don't anymore. I expect an enum back. | ||
[Coke] | down to 1,025 rakudo tickets. | ||
masak: I updated the subject to reflect that yesterday. | |||
masak | ah, sugoi. | ||
ShimmerFairy | masak: I think c.succ depends on what kind of mathematical model you want, whether you want it to loop (c.succ -> a), treat the bounds of the enum as though they were infinity or something (c.succ -> c), or something else/not-math-related (c.succ -> ERROR) | ||
kanl | moritz: so you're right. it's the container type, i.e. list being compared. thanks! | ||
moritz++ | |||
12:37
vendethiel left
|
|||
masak | ShimmerFairy: it's spec that c.succ -> c | 12:38 | |
ShimmerFairy: if you want other semantics, define your own sub :) | |||
ShimmerFairy | ah, ok then :) I was unaware | ||
[Coke] | Please add a pointer to the design docs in the ticket to make me happy. | ||
kanl | thanks everybody for helping me debug! | ||
[Coke] | r: say "no hugmebot?" | 12:39 | |
camelia | rakudo-{moar,jvm} fadca9: OUTPUT«no hugmebot?» | ||
masak | [Coke]: hum. I don't see any mention of .succ in S12... | ||
but there's prior art :) | |||
m: say False.pred; say True.succ | 12:40 | ||
camelia | rakudo-moar fadca9: OUTPUT«FalseTrue» | ||
ShimmerFairy | masak: Admittedly, the only number ring (if it's even the correct terminology) I know of off-hand is the one that makes 1/0 = ∞ , at the expense of nice everyday things (like 1 < 2) :) | ||
[Coke] | m: say False.succ; | ||
camelia | rakudo-moar fadca9: OUTPUT«True» | ||
masak | ShimmerFairy: it's not the correct terminology :) | ||
[Coke] | m: say Bool.WHAT | ||
camelia | rakudo-moar fadca9: OUTPUT«(Bool)» | ||
masak | ShimmerFairy: you might be looking for a concept such as en.wikipedia.org/wiki/Cyclic_group | ||
[Coke] | m: say Bool ~~ Enum | ||
camelia | rakudo-moar fadca9: OUTPUT«False» | ||
masak | Enum is not what you think it is... | 12:41 | |
m: enum A <b c>; say A ~~ Enum | |||
camelia | rakudo-moar fadca9: OUTPUT«False» | ||
masak | m: enum A <b c>; say b ~~ Enum | ||
camelia | rakudo-moar fadca9: OUTPUT«False» | ||
masak | o.O | ||
[Coke] | m: say Bool ~~ enum | ||
camelia | rakudo-moar fadca9: OUTPUT«5===SORRY!5===Whitespace required after keyword 'enum'at /tmp/Ax08Hqkszk:1------> 3say Bool ~~ enum7⏏5<EOL>Undeclared routine: enum used at line 1» | ||
masak | bloody Perl 6. | ||
what the heck is Enum, then? | |||
m: enum A <b c>; say b.WHAT | |||
camelia | rakudo-moar fadca9: OUTPUT«(A)» | ||
[Coke] | Anyway, I probably enough info to try to make the ticket work. Thanks TimToady, masak. | ||
m: say Enum.WHAT | 12:42 | ||
camelia | rakudo-moar fadca9: OUTPUT«(Enum)» | ||
masak | no, thank *you* :) | ||
[Coke] | ^^ :) | ||
masak | TimToady: one of us should spec .pred and .succ on enums. | ||
12:42
breinbaas joined
|
|||
ShimmerFairy | masak: I *believe* this is what I was thinking of, though it's been a while since I read up on the weird variations on real numbers :) en.wikipedia.org/wiki/Real_projective_line | 12:43 | |
masak | oh, you were thinking of that one. yeah, that's more towards the direction of topology. | ||
DrForr | As long as it forms an algebraic field :) | 12:44 | |
masak | yeah, that's what I thought ShimmerFairy was talking about :) | 12:45 | |
12:45
uncleyear left
|
|||
ShimmerFairy | I used "ring" in the sense that it looks like one in the graphic :P | 12:46 | |
masak | heh. | ||
12:46
vendethiel joined,
uncleyear joined
|
|||
masak | ShimmerFairy: in algebra, a ring is something with addition and multiplication, plus some simple laws that regulate those. | 12:47 | |
ShimmerFairy | Yeah, I've seen that ring has a specific mathematical meaning before, so I had a sneaking suspicion I wasn't using it in the formally correct sense :) | 12:48 | |
DrForr | You are correct, sir :) | ||
jnthn | .oO( algebreic topology taught me that two rings would make a donut, but the last thing I tried with two rings ended up with me married :P ) |
12:52 | |
12:52
RabidGravy joined
|
|||
moritz | jnthn: were your wedding rings edible, at least? :-) | 12:52 | |
12:53
breinbaa1 left,
abraxxa left
|
|||
timotimo | or perhaps eligible for trade-in at a Dunkin' Donuts? | 12:55 | |
jnthn | moritz: I just tried, and wife gave me a funny look :P | 12:56 | |
masak | jnthn: oh, in the sense of direct product, yes. | 12:57 | |
jnthn: but please call them "circles" :) | 12:58 | ||
RabidGravy | warm | ||
jnthn | But "if you liked it shoulda put a circle on it" breaks meter... :P | ||
masak | :P | ||
the product space of two circles is a torus. you could think of the two original circles as helping to form the "inner tube" and the "hole in the middle", respectively. | 12:59 | ||
RabidGravy | adjustable by changing to other words though | ||
two | |||
13:03
espadrine left,
espadrine_ joined
13:08
vendethiel left
13:09
vendethiel joined,
lucasb joined
|
|||
muraiki | jnthn++ # two rings joke | 13:11 | |
13:12
amurf joined
|
|||
hoelzro | good morning, #perl6 | 13:12 | |
masak | hoelzro! \o/ | ||
vendethiel | o/ #perl6, \o hoelzro | ||
masak | vendethiel! \o/ | 13:13 | |
hoelzro | greetings masak, vendethiel | ||
13:16
amurf left
13:19
AlexDani` left
|
|||
[Coke] | gah, someone opened a ticket! it's going in the wrong direction! | 13:19 | |
FROGGS | /o\ | 13:20 | |
nwc10 | [Coke]++ # fighting to reduce the ticket mountain | 13:23 | |
[Coke] | jnthn++ and bartolin++ get all the credit these days. | 13:24 | |
can someone give me a oneliner to see if a string is valid utf8? | 13:25 | ||
moritz | in Perl 6? | 13:26 | |
try $buffer.decode('UTF-8'); say not $! | 13:27 | ||
if something is inside a Str, it's already been decoded, so not much point in checking | |||
masak | oh, say it ain't $! | ||
[Coke] | so, echo "possibly invalid" | perl6 -pe ".say" should squawk? | 13:29 | |
13:30
ab6tact left
|
|||
masak | oh, this is a ticket, isn't it? | 13:30 | |
was this Zefram's ticket? | |||
moritz | [Coke]: yes | ||
hoelzro | [Coke]: sorry, that was me =/ | 13:32 | |
at least it's related to another ticket =P | |||
cdc | [Coke]: echo $'\xff\xff' | perl6 -e '.say' | 13:38 | |
(Any) | |||
however: | |||
timotimo | you need to .get.say or something | ||
cdc | m: Blob.new(\xff\xff).decode | ||
camelia | rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/p6a47tx7qAUnable to parse expression in argument list; couldn't find final ')' at /tmp/p6a47tx7qA:1------> 3Blob.new(\xff\7⏏5xff).decode» | ||
timotimo | er | 13:39 | |
13:39
vytas joined
|
|||
moritz | m: Blob.new(0xff, 0xff).decode | 13:39 | |
camelia | rakudo-moar fadca9: OUTPUT«Malformed UTF-8 at line 1 col 1 in block <unit> at /tmp/dOU8uRmg4a:1» | ||
cdc | m: Blob.new(0xff, 0xff).decode | ||
camelia | rakudo-moar fadca9: OUTPUT«Malformed UTF-8 at line 1 col 1 in block <unit> at /tmp/w2oNp0XuzF:1» | ||
13:39
vytas left
|
|||
timotimo | i meant perl6 -e 'get.say' | 13:39 | |
cdc | moritz: you were faster :) | ||
moritz | cdc: I've been probably doing Perl 6 a bit longer than you did, too :-) | ||
hoelzro | I don't think Regex.gist/Regex.perl has any tests in roast; should it? | ||
cdc | moritz: for sure! :) | 13:40 | |
moritz | hoelzro: the problem with both is that they have lots of variability in their output | ||
cdc | timotimo: $ echo $'\xff\xff' | perl6 -e get.say | ||
Malformed UTF-8 | |||
hoelzro | moritz: true | 13:41 | |
I'm just thinking of doing RT #125383 real quick, and am wondering if I should add tests | |||
kanl | m: my $m = 0 but False; say ?$m; $m += 1; say ?$m; +$m += 1; | 13:42 | |
camelia | rakudo-moar fadca9: OUTPUT«FalseTrueCannot modify an immutable Int in block <unit> at /tmp/lj_miRI_Hf:1» | ||
FROGGS | kanl: +$m results in a constant | 13:43 | |
I mean, there is no container you can assign to | 13:44 | ||
kanl | oh. i.c but does += get applied to both 0 and False? | ||
13:44
vytas joined
|
|||
FROGGS | I dunno | 13:44 | |
kanl | it appears so. | 13:45 | |
just want to know if it's the expected behavior | 13:46 | ||
dalek | kudo/nom: bd0401b | hoelzro++ | src/Perl6/Actions.nqp: Include (regex|token|rule) if present in Regex.perl Fixes RT #125383 |
13:47 | |
13:48
vytas left
13:50
vytas joined
|
|||
masak | m: my $m = 0 but False; say $m.Bool | 13:51 | |
camelia | rakudo-moar fadca9: OUTPUT«False» | ||
moritz | kanl: looks fne to me | ||
*fine | |||
masak | m: my $m = 0 but False; $m++; say $m.Bool | ||
camelia | rakudo-moar fadca9: OUTPUT«True» | ||
masak | m: my $m = -1 but False; $m++; say $m.Bool | ||
camelia | rakudo-moar fadca9: OUTPUT«False» | ||
masak | seems $m simply loses its `but`-ness. | ||
just a normal Int after incrementing it. | 13:52 | ||
kanl | thanks for the clarification | ||
13:53
espadrine_ left
|
|||
masak | m: class C { has $.x = 42; submethod BUILD {} }; say C.new.x | 13:54 | |
camelia | rakudo-moar fadca9: OUTPUT«42» | ||
masak | oh, so attributes keep their default values, even in the presence of a submethod BUILD? | 13:55 | |
m: class C { has $.x = 42; submethod BUILD(:$.x) {} }; say C.new.x | |||
camelia | rakudo-moar fadca9: OUTPUT«Cannot find method 'STORE' in submethod BUILD at /tmp/M2zHHBCwKr:1 in block <unit> at /tmp/M2zHHBCwKr:1» | ||
masak | m: class C { has $.x = 42; submethod BUILD(:$!x) {} }; say C.new.x | 13:56 | |
camelia | rakudo-moar fadca9: OUTPUT«(Any)» | ||
masak | m: class C { has $.x = 42; submethod BUILD(:$!x = 5) {} }; say C.new.x | ||
camelia | rakudo-moar fadca9: OUTPUT«5» | ||
masak | m: class C { has $.x = 42; submethod BUILD(:$!x = 5) { $.x } }; say C.new.x | ||
camelia | rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zQ0mW0_cGXVirtual call $.x may not be used on partially constructed objectsat /tmp/zQ0mW0_cGX:1------> 3.x = 42; submethod BUILD(:$!x = 5) { $.x7⏏5 } }; say C.new.x expecting any of: …» | ||
masak | that "Virtual call" error message should probably happen for :$.x as well... | ||
masak submits rakudobug | |||
vendethiel | masak: for :$.x? you have :$!x | 13:57 | |
13:57
FROGGS left
|
|||
masak | further up. | 13:57 | |
hoelzro | timotimo: do you approve of my fix for rt.perl.org/Ticket/Display.html?id=125383? | ||
13:59
espadrine_ joined
|
|||
timotimo | oh RT, come on! "Could not load ticket 125383?" %) | 14:00 | |
yeah, i do approve :) | 14:01 | ||
hoelzro | \o/ | 14:02 | |
dalek | kudo/nom: 26bc4d5 | hoelzro++ | src/Perl6/Actions.nqp: Trim trailing whitespace from Regex source |
14:05 | |
masak | m: class C { has $.x; has $.y = 42; submethod BUILD(:$!x) {} }; (.say for .x, .y) given C.new(:x(5)) | 14:07 | |
camelia | rakudo-moar fadca9: OUTPUT«542» | ||
masak | \o/ | ||
14:07
kanl left
14:08
skids joined
|
|||
lucasb | m: do { say 1 } if True | 14:15 | |
camelia | rakudo-moar fadca9: OUTPUT«1» | ||
lucasb | m: do { say 1 } given True | ||
camelia | rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fCJpGZs8zMUnsupported use of do...given; in Perl 6 please use repeat...while or repeat...untilat /tmp/fCJpGZs8zM:1------> 3do { say 1 } given True7⏏5<EOL>» | ||
lucasb | I do see anything wrong if 'do {} given' or 'do {} for', but the error message tells me to use repeat for both cases | 14:16 | |
*with | |||
*I don't see anything wrong with | 14:17 | ||
masak | it's because it considers `given` to be a loop. | 14:18 | |
14:18
brrt left
|
|||
masak | I agree with you, that error message shouldn't trigger on do..given | 14:18 | |
lucasb: feel free to submit a rakudobug. | |||
14:19
cognominal left
|
|||
lucasb | masak: ok, thanks. what's your opinion on 'do {} for ...' ? | 14:19 | |
14:21
diana_olhovik left
14:22
diana_olhovik joined
14:27
pullphinger joined
14:29
Ven joined
|
|||
lucasb | "for @a { s/a/b/ }" works ok, but when I do "for $fh.lines { s/a/b/ }", I get "Cannot assign to an immutable value". It works if I add 'is copy', but not with 'is rw'. | 14:40 | |
14:40
VinceDee joined
|
|||
timotimo | right, the value you get passed from lines can't accept changes because of what the underlying storage is | 14:41 | |
14:42
virtualsue joined
|
|||
lucasb | timotimo: so, .lines return literal strings that are not stored in a container, right? ok, thanks. | 14:43 | |
timotimo | at least that's my assumption | ||
dalek | p: 9a94d3e | jnthn++ | src/vm/jvm/QAST/Compiler.nqp: Add missing :tc argument. |
14:44 | |
p: c1b189a | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/VMArrayInstance (11 files): Implement dimensions/set_dimensions in VMArray. |
|||
p: 79a13b0 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Implement [num|set|<?>]dimensions ops on JVM. |
|||
jnthn | Yes, timotimo++ is correct. | ||
timotimo | BBIAB | 14:45 | |
jnthn | Well, that's 14/188 tests... | ||
timotimo | if it's an S-shaped curve again, that's promising :) | ||
b2gills | `do { say 1 } given True` doesn't make sense to me unless you mean `{ say 1 }() given True` | 14:48 | |
14:51
khw joined,
khw_ joined,
cschwenz joined
|
|||
b2gills | ... or you want to change it to parse like `my $a = ({ say 1} given True);` instead of `(my $a = { say 1 }) given True` | 14:52 | |
m: sub f { { say 1 } given True }; say f | 14:53 | ||
camelia | rakudo-moar 26bc4d: OUTPUT«1True» | ||
14:53
khw_ left
|
|||
lucasb | I used 'do {}' because I was playing with writing a 'for' statement modifier, followed by a 'given' statement modifier | 14:54 | |
cschwenz | When testing, is there a version of is-approx() for which I can specify the tolerance? (So, for example, if I wanted to verify a timing is within a microsecond [1e-6] of what I expect.) | 14:55 | |
lucasb | I think I like chained/cascading statement modifiers, but I understand they are not supported | ||
cschwenz | Or do I have to roll my own? | ||
dalek | kudo/nom: 4bdbe83 | lizmat++ | src/core/List.pm: Some cosmetics for easier testing |
||
kudo/nom: 406aae9 | lizmat++ | src/core/native_array.pm: Give array[int|num].splice same as List.splice |
|||
ast: c3d8169 | lizmat++ | S32-array/splice.t: Added support for array[int|num].splice testing Alas, there's still a lot of breakage, so still work in progress |
14:57 | ||
14:59
khw left
15:00
khw joined
15:01
g4 left
|
|||
lizmat | afk again& | 15:02 | |
15:06
diana_olhovik left
15:07
VinceDee left
15:11
FROGGS joined,
zakharyas1 left
|
|||
ugexe | cschwenz: multi sub is-approx(Numeric $got, Numeric $expected, Numeric $tol, $desc = '') is export { | 15:13 | |
cschwenz | ah, thanks ugexe! :-) | ||
ugexe | there is a 5 argument version as well that takes these in place of Numeric $tol: | 15:14 | |
Numeric :$rel_tol = 1e-6, Numeric :$abs_tol = 0 | |||
dalek | p: 2b4221c | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SixModelObject.java: Multi-dim REPR API correctoins. |
15:15 | |
p: ef20fbf | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Implement generic multi-dim read/write ops. |
|||
p: 404e842 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/VMArrayInstanceBase.java: Implement multi-dim access funcs in VMArray. |
|||
jnthn | *groan* | 15:16 | |
15:16
cognominal joined
|
|||
jnthn | Of all the words to typo... | 15:16 | |
muraiki | haha | 15:25 | |
ugexe | better revert | 15:26 | |
15:27
virtualsue left,
virtualsue joined
15:30
nys joined
15:34
spider-mario joined,
cschwenz left
15:36
ShimmerFairy left
|
|||
dalek | p: a21ba08 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/ (3 files): Stub in MultiDimArray REPR on JVM. |
15:38 | |
itz__ | is there any way of introspecting Int to show Int.DEFINITE? | 15:44 | |
TimToady | m: say Int.DEFINITE | 15:48 | |
yoleaux | 11:06Z <jnthn> TimToady: fixed, thanks! | ||
camelia | rakudo-moar 406aae: OUTPUT«False» | ||
15:48
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
itz__ | I was thing of something like Int.^methods displaying DEFINITE | 15:49 | |
errr s/thing/thinking | |||
PerlJam | itz__: since DEFINITE is macroish, probably not. | 15:51 | |
lucasb | m: $_ = 'a1'; s/(\d+)/<$0>/; .say | 15:52 | |
camelia | rakudo-moar 406aae: OUTPUT«a<1>» | ||
lucasb | m: my @a = <a1 b2 c3>; for @a { s/(\d+)/<$0>/ }; say @a | ||
camelia | rakudo-moar 406aae: OUTPUT«Use of Nil in string context in code at /tmp/dZX6Wl36PP:1a<> b<1> c<2>» | ||
lucasb | ^^ I think this is related to the bug mentioned a few days ago about the example in S05 "s:g[\$ <( \d+ )>] *= 2" not working with 'perl -pe' | ||
In a for loop, it seems like $/ is only updated in the next iteration. Any confirm my interpretation? | |||
*anyone | |||
15:53
aborazmeh left
15:56
virtualsue left
15:58
virtualsue joined,
ShimmerFairy joined
16:03
domidumont left
16:05
Alina-malina left
|
|||
moritz confirms | 16:07 | ||
16:08
Begi joined
|
|||
Begi | Hey ! I'm still trying to improve my Perl6. I've code a converter °C -> °F & °F -> °C. Can you take a look at it and tell me what can I improve ? Thansk for advance ! | 16:10 | |
[Coke] | url? | ||
Begi | The code is here : github.com/Emeric54/perl6/blob/mas...tisseur.p6 | ||
[Coke] | while 1 -> loop | ||
Begi | Oh yes, I always forget :/ | 16:11 | |
hoelzro | sub mode1/mode2 could easily be a multi | ||
dalek | p: 032f577 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/MultiDimArray (2 files): Fill out MultiDimArray base class. Has the storage-type-independent bits. |
16:13 | |
Begi | homzro : a multi sub ? | ||
jnthn | multi sub mode('1') { ... }; multi sub mode('2') { ... } | 16:14 | |
But even putting that aside, then: | 16:15 | ||
if $mode eq '1' { ... } elsif $mode eq '2' { ... } else { ... } would be prettier with given/when | |||
given $mode { when '1' { ... } when '2' { ... } default { ... } } | 16:16 | ||
itz__ | and just allow temps to be entered as 23C or 70F rather than using a numerical mode | 16:18 | |
jnthn | That'd also be nice :) | ||
Begi | Good idea :) I'll try to correct that, thanks :) | ||
16:19
TEttinger joined
|
|||
Begi | In fact, what are the adavantages of given? | 16:21 | |
16:21
uncleyea1 joined
|
|||
jnthn | Begi: The most immediate one is avoiding mentioning the $mode variable multiple times | 16:22 | |
16:22
uncleyear left
|
|||
jnthn | Begi: And when you get things to a single use, you can sometimes eliminate them | 16:22 | |
16:23
Ven left
|
|||
jnthn | e.g. given selectMode() { when '1' { ...} ... } | 16:23 | |
16:24
petercommand left
16:25
petercommand joined
16:27
telex left
|
|||
Begi | Ok, thanks. I'll try to use it more often :) I hop it's better now : github.com/Emeric54/perl6/blob/mas...tisseur.p6 | 16:28 | |
16:28
telex joined
16:29
domidumont joined
|
|||
Begi | If it's correct now, I'll try to do like itz said | 16:29 | |
[Coke] | the say should be in a default {} block. | 16:36 | |
otherwise I'd expect it to say that after anything but 3 was picked. | |||
Begi | Coke : Where should I place the say ? | 16:39 | |
[Coke] | given $mode { when '1' { ... } when '2' { ... } default { PUT SAY HERE } } | ||
16:39
virtualsue_ joined
|
|||
[Coke] | it's the default - it's what you get when none of the when blocks match. | 16:39 | |
where's the GLR these days? | 16:40 | ||
Begi | you answered my question :) Thnaks for all ! | ||
[Coke] | Begi: ~~ | 16:41 | |
16:42
virtualsue left,
virtualsue_ is now known as virtualsue
16:45
spider-mario left
|
|||
[Coke] | Are the macros we have going to be left in for Christmas? | 16:45 | |
Or are they going to be removed and come back later(/better/stronger/whatever) | |||
(we don't really have a way to tag something as a macro-related ticket. thinking of adding [MACRO] to all of them in RT for easier sorting. | 16:46 | ||
16:52
Begi left
17:00
xinming joined
17:04
Hor|zon left
17:23
virtualsue left
17:24
virtualsue joined
17:27
tinyblak_ left
17:28
uncleyea1 left
17:33
vendethiel left
17:37
vendethiel joined
17:47
tinyblak joined
17:48
virtualsue_ joined,
diana_olhovik joined
17:49
domidumont left,
virtualsue left,
virtualsue_ is now known as virtualsue
17:51
kaare_ left
17:54
Alina-malina joined
17:56
diana_olhovik left
17:57
diana_olhovik joined
18:01
vendethiel left
18:03
vendethiel joined
|
|||
masak | [Coke]: I have no horse in the race of whether macros should be left in. | 18:14 | |
[Coke]: I think they see little use in the ecosystem, but nevertheless use. so I'd be inclined to leave them in unless I hear a strong argument against. | 18:15 | ||
(one of jnthn's modules uses them, for example) | |||
[Coke]: feel free to add [MACRO] to all such RT tickets. I think the union of the searches for 'macro' and 'quasi' will find everything macro-related in RT. | 18:16 | ||
moritz | masak: news.ycombinator.com/item?id=9864824 your maze blog post from February is on the hn front page | ||
masak | huh :) | ||
grr, gotta find and fix that string-handling bug. | 18:18 | ||
I meant to look at that today... but I got distracted by a really successful greenfield Perl 6 thing. | |||
18:28
brrt joined
18:35
virtualsue left
18:36
virtualsue joined
18:42
brrt left
|
|||
b2gills | .tell Begi This is how I might have started: `loop {prompt('> ') ~~ /^ \h* $<d> = ['-'?\d+] \h* $<s> = <[CF]> \h* $/;given $<s> {when 'C' { say "$<d> °C = { $<d> * (9/5) + 32 } °F" }when 'F' { say "$<d> °F = { ($<d> - 32) * (5/9) } °C" }default { last }}}` ( What you have is perfectly fine as well ) | 18:45 | |
yoleaux | b2gills: I'll pass your message to Begi. | ||
18:47
[Tux] left
18:49
[Tux] joined
18:50
domidumont joined
18:59
virtualsue left
19:00
[TuxCM] joined
19:01
Alina-malina left,
[Tux] left
19:09
espadrine_ left
19:11
virtualsue joined
19:28
FROGGS left
19:34
tinyblak left
|
|||
ugexe | freebsd recently (9th or 10th) started failing the last test of t/spec/S17-supply/start.t on MoarVM only (expected: [1, 1] got: [1, 1]) | 19:42 | |
gist.github.com/ugexe/6464a5d63b1ecf9a1dd0 | |||
masak | quick poll: has anyone ever had to deal with processing instructions inside of their XML, HTML, or SGML? ('deal with' means either parse them, add them, or manipulate them in the document.) | 19:45 | |
19:46
domidumont left
|
|||
hobbs | masak: occasionally. <?xml-stylesheet?> :) | 19:48 | |
masak | oh, ok. yeah, that's the example Wikipedia had, too. | ||
[TuxCM] | masak, I used xslt for that | 19:49 | |
and later also LibXML | |||
masak | [TuxCM]: ...to parse PIs? | ||
[TuxCM] | then I guess I misunderstood | ||
adding/deleting/changing attributes/namespaces/subsections | 19:50 | ||
masak | ah, yes. sounds like the non-PI parts of XML :) | ||
[TuxCM] | fwiw speed is really bad today: 45/44 | 19:51 | |
masak | I can't recall ever seeing a processing instruction in the wild. I hadn't heard of the <?xml-stylesheet?> one until today. | ||
19:52
vendethiel left
19:57
vendethiel joined
20:00
bin_005 joined
20:01
MueThoS76 joined
20:02
MueThoS76 left
20:04
muraiki left
|
|||
bartolin | ugexe: I run daily spectests on freebsd (10.1) and don't see failures in S17-supply/start.t | 20:04 | |
dalek | kudo/nom: 5f7ce71 | lizmat++ | src/core/native_array.pm: Don't bother type checking, the guts will do it |
20:05 | |
lizmat | S17-supply/start.t is a flapper for me, it flaps more or fewer times depending on the build :-( | 20:06 | |
aka, an unrelated change can make it flap more or fewer times | |||
geekosaur | yep. I've seen it flap on OS X and Linux as well | 20:07 | |
20:08
bin_005_v joined
|
|||
bartolin | hmm. I don't run tests parallel, maybe that's the reaseon for clean tests of that file | 20:09 | |
20:10
bin_005 left,
darutoko left
20:19
vendethiel left
|
|||
ugexe | i ran the test by itself and continue to get the same result | 20:21 | |
in windows/linux using moar and jvm (or freebsd jvm) i cant get it to fail | 20:22 | ||
jnthn | It's only a gut feeling and I've no basis for this at all, but it seems the OSX memory and threading libraries are somehow good at showing up issues more often than they show up on other platforms. | 20:24 | |
bartolin | could the c compiler used explain the different behaviour (ugexe++ gets failures on freebsd, I do not)? | 20:26 | |
20:27
diana_olhovik left,
kaare_ joined
|
|||
dalek | ast: e26327b | usev6++ | S06-signature/type-capture.t: Add test for RT #114724 |
20:28 | |
geekosaur | hm, actually, come to think of it I don;'t think I'd seen that test flap on OS X. (not actually on OS X at the moment, and recent builds have all been Linux) | 20:29 | |
SO X and fbsd use the same compiler (assuming recent fbsd). threading is fairly different though | 20:30 | ||
20:32
vendethiel joined
|
|||
jnthn | sleep time & | 20:36 | |
lizmat | good night, jnthn | 20:47 | |
20:48
TEttinger left
|
|||
dalek | kudo/nom: 97ebe47 | lizmat++ | src/core/ (5 files): No word parcels for descriptive texts, skids++ |
20:49 | |
20:54
vendethiel left,
skids left
20:55
dha joined
|
|||
lizmat | .tell skids Looks like github.com/rakudo/rakudo/blob/nom/...ck.pm#L307 will never be reached | 20:57 | |
yoleaux | lizmat: I'll pass your message to skids. | ||
20:58
kaare_ left
|
|||
bartolin | ugexe: I stand corrected: I was able to get a failure with S17-supply/start.t on freebsd (build from 24 hours ago) | 21:05 | |
[Coke] | %ENV{$key} = nqp::p6box_s(nqp::iterval($envelem)); # causes things to die if env vars contain invalid UTF8. | ||
bartolin | it failed with "expected: [1, 1] got: [1]" | ||
[Coke] | RT #125420 | ||
^^ Should env be a hash of bytes instead of strings? | 21:06 | ||
21:06
vendethiel joined,
bin_005_v left
21:07
bin_005_v joined
21:09
ohb joined
|
|||
masak | [Coke]: that sounds both like a solution and like an unfortunate solution at the same time... :/ | 21:11 | |
[Coke]: when thinking about it, I find I would prefer some seemingly impossible "best of both worlds" solution. | |||
geekosaur | envars are bytestrings on POSIX | 21:12 | |
masak | something like, if it's utf8-decodable, I will get a Str, no fuss. if it isn't, I can still get it as a Buf or something. | ||
in particular, the program should not fail just because %*ENV contains something not utf8-decodable. | 21:13 | ||
masak names this tendency "utf8 chauvinism" | |||
[Coke] | doable if we try to create a string, catch an exception, and then fallback to a blob. | 21:14 | |
m: say Int < 0; | |||
camelia | rakudo-moar 5f7ce7: OUTPUT«Invocant requires a 'Int' instance, but a type object was passed. Did you forget a .new? in block <unit> at /tmp/FxDY0SnX9r:1» | ||
masak | yes, but... | ||
[Coke] | m: say "cat" gt Str; | ||
camelia | rakudo-moar 5f7ce7: OUTPUT«Use of uninitialized value of type Str in string context in block <unit> at /tmp/2imsHVEvga:1True» | ||
hobbs | making it always bytes is a pain, but less of a source of bugs | ||
masak | ...anytime we create such a mixed %*ENV hash, it becomes much harder to program against. | ||
at the very least, people will assume it's always Str all over the place. | 21:15 | ||
maybe this actually merits its own Str|Buf-like type, something that puts people through the motions of always checking. | |||
masak .oO( the solution to typing-related problems: more types! ) | |||
[Coke] | m: use Test; throws-like '"cat" gt Str', X::AdHoc | 21:16 | |
camelia | rakudo-moar 5f7ce7: OUTPUT« 1..2Use of uninitialized value of type Str in string context in block <unit> at EVAL_0:1 not ok 1 - '"cat" gt Str' died # Failed test ''"cat" gt Str' died'# at /tmp/aE2piWwcKE line 1 ok 2 - # SKIP Code did not die, can not c…» | ||
[Coke] | m: use Test; throws-like '1 > Int', X::AdHoc | ||
camelia | rakudo-moar 5f7ce7: OUTPUT« 1..2 ok 1 - '1 > Int' died ok 2 - right exception type (X::AdHoc)ok 1 - did we throws-like X::AdHoc?» | ||
[Coke] | ^^ That seems inconsistent. | ||
masak | this is a problem with filenames/paths as well. | ||
[Coke]: you have to put the expected-failing code in a block. | 21:17 | ||
[Coke]: likely you are getting an X::AdHoc in the second case for the wrong reasons. | |||
[Coke] | S03-operators/misc.t ends with several tests where it is not a block. | 21:18 | |
I had just copied that. | |||
masak | hm, maybe there's a string version... :/ | ||
what's the advantage of having it as strings, I wonder... maybe if a parsefail is expected. | |||
[Coke] | m: use Test; throws-like {1 > Int}, X::AdHoc | 21:19 | |
camelia | rakudo-moar 5f7ce7: OUTPUT« 1..2 ok 1 - code dies ok 2 - right exception type (X::AdHoc)ok 1 - did we throws-like X::AdHoc?» | ||
[Coke] | m: use Test; throws-like {Str gt "cat"}, X::AdHoc | ||
camelia | rakudo-moar 5f7ce7: OUTPUT« 1..2Use of uninitialized value of type Str in string context in block at /tmp/d5GIbA40QU:1 not ok 1 - code dies # Failed test 'code dies'# at /tmp/d5GIbA40QU line 1 ok 2 - # SKIP Code did not die, can not check exception…» | ||
[Coke] | ^^ same | ||
masak | ok. | 21:20 | |
I agree that it's inconsistent. | |||
dalek | ast: 99a57ae | coke++ | S03-operators/misc.t: Add tests for RT#93978 |
||
masak | I don't know of a good reason why it should be inconsistent. | ||
[Coke] | ^^ that ticket. | ||
21:29
vendethiel left
|
|||
lizmat | m: "cat" gt Str | 21:29 | |
camelia | rakudo-moar 97ebe4: OUTPUT«Use of uninitialized value of type Str in string context in block <unit> at /tmp/RFf59fcpgW:1» | ||
lizmat | I don't see anything inconsistent ? | 21:30 | |
[Coke] | Perhaps it's failing instead of throwing. | ||
lizmat: the test function thinks it's different. | |||
m: "cat" gt Str; 2+3; | |||
camelia | rakudo-moar 97ebe4: OUTPUT«WARNINGS:Useless use of "gt" in expression "\"cat\" gt Str" in sink context (line 1)Use of uninitialized value of type Str in string context in block <unit> at /tmp/3h9mXb6tWI:1» | ||
lizmat | but but: "cat" gt Str only warns ?? | 21:32 | |
it does not die | |||
hence the throws-like fails ? | 21:33 | ||
dha | So. in the p5->p6 project, I've done perlvar, perlfunc, and perlop. | 21:34 | |
Any suggestions what I should make the next thing? Assuming I should just run away screaming, of course. | 21:35 | ||
masak | well, first off, dha++ | 21:37 | |
dha | s/should/shouldn't/ | 21:38 | |
dha bows | |||
[Coke] | dha++, of course. | ||
masak | dha: "should" seems oddly apt, too :P | 21:39 | |
dha | Well, yes. :-) | 21:40 | |
21:40
Hor|zon joined
21:42
vendethiel joined
|
|||
masak | dha: here are the ones I think would be interesting to see a translation of: perlrun, perllol, perlre*, perlootut | 21:43 | |
dha | I was thinking of looking at perlsyn, but since things like while and for loops are not solidly documented for p6... ugh. | ||
masak | "solidly documented"? at least those things are quite stable at this point. | ||
and you can always ask here. | |||
dha | True. | ||
masak | in a way, Perl 6 syntax is in a better position than Perl 5 syntax, because STD.pm6 is more readable than toke.c | 21:44 | |
21:45
Hor|zon left
|
|||
masak | m: class C { has $.x is required; submethod BUILD(:$!x) {} }; say C.new.x | 21:48 | |
camelia | rakudo-moar 97ebe4: OUTPUT«(Any)» | ||
dha | I imagine that's true, but in reality, the concept of "you can just look at the source code!" isn't actually useful for most people trying to program stuff. | ||
masak | is this... expected behavior? does the :$!x in a BUILD parameter trump the 'is required' trait of the attribute? | 21:49 | |
dha: I meant that it might be useful for people trying to port perlsyn. | 21:50 | ||
dha | *nod* | ||
21:56
atroxaper joined
|
|||
RabidGravy | I also think there should be some equivalent to perlipc but it's so different I don't think a straight port is a good idea | 21:56 | |
22:01
atroxaper left
|
|||
RabidGravy | but hey I can do MP3 encoding now, not quite sure that it's fast enough to do it "live" but I'll test tomorrow | 22:03 | |
dalek | ast: 5e2ad04 | lizmat++ | S32-array/splice.t: Some more splice testing, still in progress |
22:07 | |
ast: 29a3ff9 | lizmat++ | S0 (2 files): Merge branch 'master' of github.com/perl6/roast |
|||
22:07
vendethiel left
|
|||
lizmat | and with that I wish #perl6 good night! | 22:09 | |
masak | 'night, lizmat | 22:11 | |
cognominal | not sure how to use run to create a pipe. | 22:20 | |
yoleaux | 01:37Z <b2gills> cognominal: `say True.'!'()` calls a method by its name at runtime ( think `$a."$b"()` parens are required ). Currently to call a prefix operator as a method: `say True.&prefix:<!>` ( any code reference would work `$b = &say; $a.$b` ) I think? S03 should be changed to match | ||
22:20
pullphinger left
|
|||
cognominal | how would I do a ls| with a run? | 22:20 | |
m: say True.'!'() | 22:22 | ||
camelia | rakudo-moar 97ebe4: OUTPUT«Method '!' not found for invocant of class 'Bool' in block <unit> at /tmp/R_mwsQfd6n:1» | ||
lucasb | m: .say for run('ls', :out).out.lines[^5] | ||
camelia | rakudo-moar 97ebe4: OUTPUT«run is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:1 in sub run at src/RESTRICTED.setting:14 in block <unit> at /tmp/UaAmhc2Y5k:1» | ||
lucasb | oops | ||
cognominal | m: say True.&prefix:<!> | ||
camelia | rakudo-moar 97ebe4: OUTPUT«False» | ||
cognominal | m: say True.&prefix:<!>() | ||
camelia | rakudo-moar 97ebe4: OUTPUT«False» | ||
lucasb | cognominal: that's how I think it could be | 22:23 | |
^^ | |||
cognominal | thx lucasb | ||
runs fine | 22:24 | ||
22:27
rurban left
22:33
rurban1 left
|
|||
masak | 'night, #perl6 | 22:48 | |
22:51
dj_goku left,
raiph joined
22:53
skids joined
22:56
Exodist joined
22:57
dj_goku joined,
dj_goku left,
dj_goku joined
22:59
muraiki joined
|
|||
skids | o/ | 23:01 | |
yoleaux | 20:57Z <lizmat> skids: Looks like github.com/rakudo/rakudo/blob/nom/...ck.pm#L307 will never be reached | ||
23:02
RabidGravy left
|
|||
skids | .tell lizmat proceed resumes matching when clauses. Also that code is temporary and we'll just throw those once .assuming has burned it wrt ecosystem falout. | 23:02 | |
yoleaux | skids: I'll pass your message to lizmat. | ||
23:10
vendethiel joined
|
|||
tony-o | m: say 5.^infix:<+>(5); | 23:18 | |
camelia | rakudo-moar 97ebe4: OUTPUT«Method 'infix:<+>' not found for invocant of class 'Perl6::Metamodel::ClassHOW' in block <unit> at /tmp/GbhOhkGEXi:1» | ||
tony-o | m: say 5.&infix:<+>(5); | ||
camelia | rakudo-moar 97ebe4: OUTPUT«10» | ||
tony-o | m: say 5.&infix:<+>(5,6,7); | ||
camelia | rakudo-moar 97ebe4: OUTPUT«Too many positionals passed; expected 0 to 2 arguments but got 4 in block <unit> at /tmp/cLybWXozUp:1» | ||
23:29
Hor|zon joined
|
|||
skids | That reminded me... does anyone keep a dogpile of ecosystem+any other per6 code they find, such that it can all be grepped? I'd be interested to know where .assuming is already bein used. | 23:29 | |
23:33
vendethiel left
23:34
Hor|zon left
23:35
telex left
23:36
telex joined
23:37
dha left
23:38
lucasb left,
geekosaur left
23:39
geekosaur joined
23:40
virtualsue left
23:44
atroxaper joined
23:45
leont joined
23:47
AlexDani` joined,
AlexDani` is now known as AlexDaniel,
TEttinger joined
|
|||
AlexDaniel | m: loop (my $i = 0; $i <= 5; $i++;) { say } | 23:48 | |
camelia | rakudo-moar 97ebe4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YgalfVZJ4fMissing blockat /tmp/YgalfVZJ4f:1------> 3loop (my $i = 0; $i <= 5; $i++7⏏5;) { say }» | ||
AlexDaniel | m: loop (my $i = 0; $i <= 5; $i++ {;) { say } | 23:49 | |
camelia | rakudo-moar 97ebe4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8DFY0MjftaUnexpected block in infix position (missing statement control word before the expression?)at /tmp/8DFY0Mjfta:1------> 3loop (my $i = 0; $i <= 5; $i++7⏏5 {;) { say } expecting any …» | ||
23:49
atroxaper left
|
|||
AlexDaniel | sure the code is wrong, but what does this error message mean | 23:49 | |
"missing block", then I give it a block and it says "unexpected block" | |||
skids | In the second one, it is ike you said: | 23:50 | |
m: my $i; $i++ { } | |||
camelia | rakudo-moar 97ebe4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/somNcZTmObUnexpected block in infix position (missing statement control word before the expression?)at /tmp/somNcZTmOb:1------> 3my $i; $i++7⏏5 { } expecting any of: infix …» | ||
TimToady | std: loop (my $i = 0; $i <= 5; $i++;) { say } | ||
camelia | std 28329a7: OUTPUT«5===SORRY!5===Malformed loop spec at /tmp/7S0kI3Pi34 line 1:------> 3loop (my $i = 0; $i <= 5; $i++7⏏5;) { say } expecting any of: POST postfix postfix_prefix_meta_operatorParse failedFAILED 00:00 137m» | ||
TimToady | I like STD's message better | ||
AlexDaniel | TimToady: now that's an error message! | 23:51 | |
skids: ok, but if it wants a block, what is the right way to make it eat it? | |||
I mean, sure it does not make sense, but if the compiler asks for it... | |||
TimToady | it doesn't really want a block there | 23:52 | |
it's just loosing track of its immediate goal and reporting on the outer goal | |||
*losing | |||
AlexDaniel | well, since the message could be better I think I will report it. Although it is not a big issue at all | 23:53 | |
TimToady | probably LHF for someone | ||
AlexDaniel | should I mark it as lhf? | 23:54 | |
TimToady | sure | ||
AlexDaniel | great | ||
23:55
vendethiel joined
|
|||
AlexDaniel | it is the only place in the world where I could come with a tiny issue like this and people will take it seriously :) | 23:56 | |
so great. | |||
TimToady | just means we're neglecting all the important things :) | 23:57 |