»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
[Coke] | how does one install SVG::Plot for rakudo? | 00:03 | |
[Coke] finds panda. | 00:05 | ||
panda borked on current nom? | 00:06 | ||
00:15
ch3ck3r left
|
|||
flussence | missing some regex stuff, iirc. Lots of stuff seems to currently... | 00:17 | |
[Coke] | rakudo: class A { multi method a() { }}; use MONKEY_TYPING; augment class A { multi method a() { } } | 00:23 | |
p6eval | rakudo 545638: ( no output ) | 00:24 | |
00:25
colomon joined
|
|||
[Coke] | rakudo: for 1,2 X <a b> { say "$^x $^y" } | 00:25 | |
p6eval | rakudo 545638: OUTPUT«1 a1 b2 a2 b» | ||
[Coke] | for 1,2 X (<a b> X 'x') { say "$^x $^y" } | ||
rakudo: for 1,2 X (<a b> X 'x') { say "$^x $^y" } | 00:26 | ||
p6eval | rakudo 545638: OUTPUT«1 a1 x1 b1 x2 a2 x2 b2 x» | ||
00:28
colomon_ joined
|
|||
[Coke] | rakudo: 555 ~~!~~ 666 | 00:29 | |
p6eval | rakudo 545638: ( no output ) | ||
[Coke] | rakudo: my $a=305+437+6; say ($a-44), " tickets that aren't just blocking on tests." | 00:30 | |
p6eval | rakudo 545638: OUTPUT«704 tickets that aren't just blocking on tests.» | ||
[Coke] | rant: "LTA error message" is not, by itself, an actionable ticket. | 00:31 | |
00:31
colomon left,
colomon_ is now known as colomon
00:33
Chillance left
|
|||
colomon | [Coke]: I know the thought on the LTA error message tickets is to remind us to be better. But obviously it's a pretty low priority thing! | 00:34 | |
[Coke] | rakudo: @_.=[3] | 00:38 | |
p6eval | rakudo 545638: OUTPUT«===SORRY!===Cannot declare placeholder parameter @^_ in the mainline at line 1, near ".=[3]"» | ||
00:39
colomon left
|
|||
[Coke] | rakudo: say 1 % 0 | 00:41 | |
p6eval | rakudo 545638: OUTPUT«1» | ||
00:41
replore joined
|
|||
[Coke] | std: class A {}; sub A {} | 00:41 | |
p6eval | std 20ae3bd: OUTPUT«===SORRY!===Illegal redeclaration of routine 'A' (see line 1) at /tmp/1e7_lwVnRT line 1:------> class A {}; sub A⏏ {}Check failedFAILED 00:01 119m» | ||
[Coke] | rakudo: class A {}; sub A {} | ||
p6eval | rakudo 545638: ( no output ) | ||
[Coke] | rakudo: say 16 < 5 < 66 | 00:42 | |
p6eval | rakudo 545638: OUTPUT«Bool::False» | ||
[Coke] | rakudo: say (16 < * < 66)(5) | ||
p6eval | rakudo 545638: OUTPUT«Bool::True» | ||
00:45
whiteknight left
00:46
whiteknight joined
|
|||
[Coke] | rakudo: my $a = class { has $a; }; say $a.perl; | 00:47 | |
p6eval | rakudo 545638: OUTPUT«<anon>» | ||
[Coke] | rakudo: my $a = class { has $a; }; say $a.new(a => 1).perl; | ||
p6eval | rakudo 545638: OUTPUT«<anon><-856690017062603138>» | ||
00:48
whiteknight left
|
|||
[Coke] | rakudo: sub if() { '2' }; say if; | 00:49 | |
p6eval | rakudo 545638: OUTPUT«» | ||
benabik | nom: say if; | ||
p6eval | nom 545638: OUTPUT«Could not find sub &if in block <anon> at /tmp/eVdvJS7KRE:1 in <anon> at /tmp/eVdvJS7KRE:1» | ||
[Coke] | boy, some of these masak bugs are sticky. | ||
rakudo: my %h = {"a" => "b"}; %h{"a"} = %h.delete("a"); say %h.perl; | 00:50 | ||
p6eval | rakudo 545638: OUTPUT«().hash» | ||
diakopter | std: while (4) ; # hopefully this is legal | ||
p6eval | std 20ae3bd: OUTPUT«===SORRY!===Missing block at /tmp/0gQBL4sLsC line 1:------> while (4) ⏏; # hopefully this is legalParse failedFAILED 00:01 120m» | ||
[Coke] | rakudo: multi foo() { say "OH HAI" }; multi foo(Int $a?) {};multi foo(Str $a?) {}; foo | 00:51 | |
p6eval | rakudo 545638: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures::():(Int $a):(Str $a) in sub foo at /tmp/exSGgscNNw:1 in block <anon> at /tmp/exSGgscNNw:1 in <anon> at /tmp/exSGgscNNw:1» | ||
[Coke] | rakudo: die "A"; CATCH { say "OH HAI" }; CATCH { say "OH NOES" } | 00:52 | |
p6eval | rakudo 545638: OUTPUT«===SORRY!===only one CATCH block allowed at line 1, near ""» | ||
[Coke] | rakudo: die "A"; CONTROL { say "OH HAI" }; CONTROL { say "OH NOES" } | ||
p6eval | rakudo 545638: OUTPUT«===SORRY!===only one CONTROL block allowed at line 1, near ""» | ||
00:56
S11001001 left
|
|||
[Coke] | rakudo: 1 .. 2 .. 3 | 00:56 | |
p6eval | rakudo 545638: ( no output ) | ||
[Coke] | rakudo: my @a = <one two>; @a[-1] = 'zero'; @a.perl | 01:00 | |
p6eval | rakudo 545638: OUTPUT«Cannot use negative index -1 on Array in method throw at src/gen/CORE.setting:5980 in method <anon> at src/gen/CORE.setting:6074 in <anon> at src/gen/Metamodel.pm:2085 in find_method_fallback at src/gen/Metamodel.pm:2083 in find_method at src/gen/Metamode… | ||
[Coke] | std: my @a = <one two>; @a[-1] = 'zero'; @a.perl | 01:01 | |
p6eval | std 20ae3bd: OUTPUT«===SORRY!===Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/HGjlVLl5ks line 1:------> my @a = <one two>; @a[-1]⏏ = 'zero'; @a.perlParse failedFAILED 00:01 123m» | ||
[Coke] | is ::T valid anymore? | ||
01:05
Tene left,
djanatyn left
|
|||
TimToady | why not? | 01:09 | |
[Coke] | Just wondering if I could close some tickets, is all. | 01:10 | |
TimToady: there are several [spec] tickets that probably need you to poke at them. | |||
rakudo: multi foo() { nextsame }; foo() | 01:11 | ||
p6eval | rakudo 545638: ( no output ) | ||
TimToady | don't doubt it | ||
[Coke] | rakudo: ::() | 01:12 | |
p6eval | rakudo 545638: OUTPUT«===SORRY!===Cannot look up empty name» | ||
[Coke] | std: ::() | 01:13 | |
p6eval | std 20ae3bd: OUTPUT«ok 00:01 119m» | ||
[Coke] | is rakudo ok there? | ||
TimToady | sure | ||
rakudo: ::(()) | 01:15 | ||
p6eval | rakudo 545638: ( no output ) | ||
01:15
ggoebel left
|
|||
benabik | A variable named '()'? | 01:16 | |
TimToady | should warn about undefined | 01:17 | |
[Coke] | woot. there are now 747 tickets in the queue. | ||
benabik | nom: say ().WHAT | ||
[Coke] | there are 47 tickets that needtests. | ||
p6eval | nom 545638: OUTPUT«Parcel()» | ||
01:18
alester_ joined
|
|||
TimToady | rakudo: ::(Nil) | 01:19 | |
p6eval | rakudo 545638: ( no output ) | ||
TimToady | rakudo: ::(Any) | ||
p6eval | rakudo 545638: OUTPUT«Use of uninitialized value in string context» | ||
TimToady | rakudo: ().Str | 01:20 | |
p6eval | rakudo 545638: ( no output ) | ||
TimToady | rakudo: say ().Str | ||
p6eval | rakudo 545638: OUTPUT«» | ||
TimToady | rakudo: say Nil.Str | 01:21 | |
p6eval | rakudo 545638: OUTPUT«» | ||
TimToady | std: sub if() { '2' }; say if; | 01:24 | |
p6eval | std 20ae3bd: OUTPUT«===SORRY!===Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/L2jtRs4j7l line 1:------> sub if() { '2' }; say⏏ if;Confused at /tmp/L2jtRs4j7l line 1:-----… | ||
TimToady | std: sub if() { '2' }; say if(); | ||
p6eval | std 20ae3bd: OUTPUT«ok 00:01 122m» | ||
01:47
wolfman2000 joined
02:44
donri left
02:51
ponbiki joined
02:56
colomon joined
03:10
mishin joined
03:12
kaleem joined
03:15
colomon left
03:22
envi_ joined
|
|||
sorear | good * #perl6 | 03:25 | |
03:29
colomon joined
03:35
scorpil left,
frew joined,
frew left
03:39
colomon left
|
|||
mishin | Hi perl6 | 03:42 | |
i try to perl Configure.pl --gen-parrot under cygwin and get error gist.github.com/1263566 | 03:46 | ||
but i think i need site.icu-project.org/ | 03:50 | ||
sorear | Configure picked a compiler that doesn't exist. Wierd. | 03:52 | |
04:04
tokuhir__ joined
04:07
tokuhiro_ left,
envi_ left
04:36
lestrrat left
04:41
satyavvd joined
04:48
[Coke] left
|
|||
moritz | good morning | 04:54 | |
05:00
alester_ left
|
|||
sorear | hi moritz | 05:03 | |
05:03
mishin left
05:12
molaf joined
05:15
lestrrat joined
05:22
SHODAN joined
05:29
dual joined
|
|||
moritz | nom: sub foo() { die "OH NOEZ" } foo | 05:54 | |
p6eval | nom 545638: OUTPUT«OH NOEZ in sub foo at /tmp/2I7guEZtFD:1 in block <anon> at /tmp/2I7guEZtFD:2 in <anon> at /tmp/2I7guEZtFD:1» | ||
moritz | nom: sub foo() { die "OH NOEZ" }; foo | 05:55 | |
p6eval | nom 545638: OUTPUT«OH NOEZ in sub foo at /tmp/BnNlgTp7PK:1 in block <anon> at /tmp/BnNlgTp7PK:1 in <anon> at /tmp/BnNlgTp7PK:1» | ||
06:01
wolfman2000 left
|
|||
japhb | perl6: (0 but True).say | 06:10 | |
p6eval | rakudo 545638: OUTPUT«No applicable candidates found to dispatch to for 'infix:<but>'. Available candidates are::(Mu $obj, Positional @roles):(Mu $obj, Mu $role) in sub infix:<but> at src/gen/CORE.setting:7364 in block <anon> at /tmp/PtemMnfgKk:1 in <anon> at /tmp/PtemMnfgKk:1… | ||
..pugs: OUTPUT«*** Cannot cast from VBool True to Pugs.AST.Types.VCode (VCode) at Prelude.pm line 541, column 5-16» | |||
..niecza v10-36-g241a2d8: OUTPUT«Unhandled Exception: RoleApply with superclasses NYI at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE infix:<but> @ 0)  at /tmp/pKkgy0gIkN line 1 (MAIN mainline @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C1022_ANON @ 2)  at … | |||
06:10
tokuhir__ left
|
|||
japhb | OK, are those just three different ways to say 'NYI', or am I missing something obvious? | 06:11 | |
perl6: (0 but Bool::True).say | 06:13 | ||
p6eval | rakudo 545638: OUTPUT«No applicable candidates found to dispatch to for 'infix:<but>'. Available candidates are::(Mu $obj, Positional @roles):(Mu $obj, Mu $role) in sub infix:<but> at src/gen/CORE.setting:7364 in block <anon> at /tmp/T_XPTD3evU:1 in <anon> at /tmp/T_XPTD3evU:1… | ||
..niecza v10-36-g241a2d8: OUTPUT«Unhandled Exception: RoleApply with superclasses NYI at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE infix:<but> @ 0)  at /tmp/OgHvadB67x line 1 (MAIN mainline @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C1022_ANON @ 2)  at … | |||
..pugs: OUTPUT«*** Cannot cast from VBool True to Pugs.AST.Types.VCode (VCode) at Prelude.pm line 541, column 5-16» | |||
sorear | japhb: 2 NYI, 1 oldspec | ||
also: | |||
japhb | sorear, OK, thanks | ||
sorear | b: (0 but True).say | 06:14 | |
p6eval | b 1b7dd1: OUTPUT«0» | ||
japhb | OOC, why is b: not included in perl6: ? Seems at least as useful a comparison point as pugs: ... | ||
sorear | ask moritz | 06:15 | |
japhb | moritz, ^^ :-) | ||
phenny, ask jnthn Can you make '$value but True' and '$value but False' work without too much trouble? This is coming up when trying to implement MAIN as per spec. | 06:17 | ||
phenny | japhb: I'll pass that on when jnthn is around. | ||
sorear | japhb: try writing it longform | ||
rakudo: say (0 but role { method Bool { True } }) | |||
p6eval | rakudo 545638: OUTPUT«0» | ||
sorear | rakudo: say ?(0 but role { method Bool { True } }) | ||
p6eval | rakudo 545638: OUTPUT«Bool::True» | ||
japhb | sorear, ah ... OK, that will work for now. | 06:18 | |
sorear | per spec, this is exactly the same as 0 but True | ||
japhb | phenny, tell jnthn sorear++ has found a workaround. A bit uglier, but the long form seems to work. | ||
phenny | japhb: I'll pass that on when jnthn is around. | ||
06:19
mtk left
06:21
gnude joined
06:27
donri joined
06:32
tokuhiro_ joined
06:33
mtk joined
06:41
gnude left
06:44
mberends joined
|
|||
dalek | ecza: fce895a | mberends++ | examples/gtk-sierpinski.pl: [examples/gtk-sierpinski.pl] enable window resizing |
06:46 | |
06:47
GlitchMr joined
|
|||
sorear | hello GlitchMr | 06:48 | |
GlitchMr | Hi, sorear | ||
mberends | hi sorear: Niecza had a very good at amsterdam.pm.org last night imo. The only disappointment mentioned was startup speed, and I promised the members that the serialize branch would fix that :) | 06:51 | |
*very good showing # I should read before pressing Enter | |||
we looked at Gtk stuff and also the p5 integration examples. | 06:52 | ||
sorear should try to find a pm someday to understand what mberends is talking about better | 06:58 | ||
06:59
mj41 joined
|
|||
sorear | but not this week, too few tuits | 06:59 | |
and on that note, sleep | |||
mberends | good night | ||
GlitchMr | std: aaa{} | 07:04 | |
p6eval | std 20ae3bd: OUTPUT«===SORRY!===Undeclared routine: 'aaa' used at line 1Check failedFAILED 00:01 119m» | ||
GlitchMr | std: sub aaa{Because $aaa} | ||
p6eval | std 20ae3bd: OUTPUT«===SORRY!===Variable $aaa is not predeclared at /tmp/K5uHUxQbLn line 1:------> sub aaa{Because ⏏$aaa}Undeclared name: 'Because' used at line 1Check failedFAILED 00:01 120m» | ||
07:09
colomon joined
07:31
mishin joined
07:43
mj41 left
07:47
colomon left
07:48
baest joined
07:55
mj41 joined
|
|||
dalek | ast: ef8462e | moritz++ | S10-packages/basic.t: test class redeclaration of a package |
07:55 | |
moritz | nom: sub f($x:) { say $x }; f(3) | 07:58 | |
p6eval | nom 545638: OUTPUT«Lexical 'self' not found in sub f at /tmp/VVBtLcDj2G:1 in block <anon> at /tmp/VVBtLcDj2G:1 in <anon> at /tmp/VVBtLcDj2G:1» | ||
moritz | nom: sub f($x:) { say $x }; 3.&f | ||
p6eval | nom 545638: OUTPUT«Lexical 'self' not found in sub f at /tmp/ShMWDE7gCI:1 in method dispatch:<var> at src/gen/CORE.setting:689 in block <anon> at /tmp/ShMWDE7gCI:1 in <anon> at /tmp/ShMWDE7gCI:1» | ||
moritz | nom: sub f($x:) { say $x }; | ||
p6eval | nom 545638: ( no output ) | ||
07:58
amkrankruleuen joined
|
|||
moritz | nom: my method f($x:) { say $x }; 1.&f | 07:58 | |
p6eval | nom 545638: OUTPUT«1» | ||
dalek | ast: 044a4a6 | moritz++ | S12-subset/subtypes.t: test for RT #71820, failed subset type check error includes name of subset |
08:05 | |
moritz | nom: say (1 Z 2).perl | 08:06 | |
p6eval | nom 545638: OUTPUT«((1, 2),).list» | ||
moritz | nom: say (1 Z 2).[0].WHAT | ||
p6eval | nom 545638: OUTPUT«Parcel()» | ||
moritz | nom: say (1 Z 2).elems | ||
p6eval | nom 545638: OUTPUT«1» | ||
dalek | ast: 64bc53d | moritz++ | S03-metaops/zip.t: test that infix Z returns a list of parcels (RT #75818 |
08:09 | |
08:11
amkrankruleuen left,
amkrankruleuen joined
08:12
tokuhiro_ left
|
|||
dalek | ast: bb44b6c | moritz++ | S10-packages/joined-namespaces.t: new test file for joined namespaces |
08:14 | |
kudo/nom: 3d67ff2 | moritz++ | lib/Test.pm: [Test] do not count dying will Null PMC access as a success |
08:16 | ||
kudo/nom: 840ad74 | moritz++ | t/spectest.data: run another test file |
|||
08:27
masak joined
|
|||
masak | *yawn* good morning, #p6ople | 08:27 | |
phenny | masak: 04 Oct 23:09Z <diakopter> ask masak how many primes in the first 10^9 primes are primes when represented in a number system other than decimal, but interpreted as decimal, or vice versa? | ||
masak: 04 Oct 23:11Z <diakopter> ask masak ... or in any number system represented as another number system but interpreted as the original number system? | |||
masak: 04 Oct 23:15Z <diakopter> ask masak ... e.g. the prime X represented in base-X is 1, etc. that'll get you started. | |||
masak: 04 Oct 23:16Z <diakopter> ask masak er, scratch that last line ;) | |||
masak | :P | 08:28 | |
a kind of "number system mojibake" problem... | 08:29 | ||
moritz | I don't quite understand the problem or question | 08:30 | |
masak | in the case of interpreting in a fewer-digit number system, there will also be lots of "illegal" numbers. just stating the obvious here, really. | ||
moritz | there's a known number of primes below 1e9 | ||
and then you can think about number of ways to represent them | |||
masak | hm, indeed. | ||
moritz | or is it about strings that are primes when interpreted in two different ways? | 08:31 | |
masak | oh, it appears so. | ||
moritz | like '13'.base(10) and '13'.base(8) both being prime, even if it not the same? | ||
nom: say '13'.base(8) | 08:32 | ||
p6eval | nom 545638: OUTPUT«Method 'base' not found for invocant of class 'Str' in block <anon> at /tmp/UAf5bHITZN:1 in <anon> at /tmp/UAf5bHITZN:1» | ||
moritz | erm, wrong way around | ||
nom: say :8('13') | |||
p6eval | nom 545638: OUTPUT«11» | ||
08:32
dakkar joined
|
|||
masak | :) | 08:32 | |
I'm on irssi on screen on feather today, by the way. | |||
<jlaire> sounds very ad-hoc | 08:35 | ||
this is the feeling I get whenever "interpreted in base X" shows up. | |||
moritz | funny thing is, you can even use changing bases | 08:39 | |
08:39
mj41 left
|
|||
moritz | ie a different base for each digit | 08:39 | |
and in some of those bases, you can represent pi and e and so on as very regular numbers | 08:40 | ||
pi/2 is 1.111111... in the base (1, 1/3, 2/5, 3/7, 4/9 ...) | 08:42 | ||
nom: my @base := 1..* Z 1, 3, 5 ... *; say @base[^6].perl | 08:44 | ||
p6eval | nom 545638: OUTPUT«((1, 1), (2, 3), (3, 5), (4, 7), (5, 9), (6, 11))» | ||
moritz | nom: my @base := 1..* Z/ 1, 3, 5 ... *; say @base[^6].perl | ||
p6eval | nom 545638: OUTPUT«(1/1, 2/3, 3/5, 4/7, 5/9, 6/11)» | ||
moritz | nom: my @base := 1..* Z/ 1, 3, 5 ... *; say [+] 2 X* @base[^20] | 08:45 | |
p6eval | nom 545638: OUTPUT«22.4796732103645» | ||
moritz | erm, right, I need to build the running product of these bases | ||
nom: my @base := 1..* Z/ 1, 3, 5 ... *; say [+] 2 X* [ @base[^20] | |||
p6eval | nom 545638: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 1» | ||
moritz | nom: my @base := 1..* Z/ 1, 3, 5 ... *; say [+] 2 X* [\*] @base[^20] | ||
p6eval | nom 545638: OUTPUT«5.14157671400225» | ||
moritz | nom: my @base := 1..* Z/ 1, 3, 5 ... *; say [+] -2, 2 X* [\*] @base[^30] | 08:46 | |
p6eval | nom 545638: OUTPUT«0» | ||
moritz | nom: my @base := 1..* Z/ 1, 3, 5 ... *; say [+] 2 X* [\*] @base[^30] | ||
p6eval | nom 545638: OUTPUT«0.115608257536946» | ||
moritz | nom: my @base := 1..* Z/ 1, 3, 5 ... *; say [+] 2 X* [\*] @base[^25] | 08:47 | |
p6eval | nom 545638: OUTPUT«1.14158113096343» | ||
moritz | nom: my @base := 1..* Z/ 1, 3, 5 ... *; say pi - [+] 2 X* [\*] @base[^25] | ||
p6eval | nom 545638: OUTPUT«2.00001151903657» | ||
moritz | ... modulo the first digit, it appears :-) | ||
08:48
packetknife left
|
|||
masak | nom: my @base := 1..* Z/ 1, 3, 5 ... *; say (pi - [+] 2 X* [\*] @base[^25]) % 1 | 08:49 | |
p6eval | nom 545638: OUTPUT«1.151903657437e-05» | ||
masak | close enough :) | ||
moritz | a better way to use this identity are so-called "spigot algorithms" | 08:50 | |
dalek | kudo/nom: fc304e3 | moritz++ | src/core/Exception.pm: report errors to $*ERR |
08:51 | |
ast: 18c3485 | moritz++ | S0 (3 files): tests for RT #77056 and #76280 |
08:52 | ||
08:52
woosley joined
09:01
daxim joined
|
|||
masak | re rt.perl.org/rt3//Public/Bug/Displa...l?id=73502 | 09:06 | |
the current rakudo error message is plain wrong. | |||
and AFAIAC, there's nothing wrong with the code as such. | |||
moritz | nom: @_.= 3 | 09:07 | |
p6eval | nom 840ad7: OUTPUT«===SORRY!===Cannot declare placeholder parameter @^_ in the mainline at line 1, near ".= 3"» | ||
moritz | well, it's @_ that's being declared, not @^_ | ||
masak | right. | ||
moritz | but apart from that... I agree | ||
masak | in fact, nothing's being declared as such. | ||
moritz | @_ *is* a placeholder var in Perl 6 | ||
masak | nom: my @_ | 09:08 | |
p6eval | nom 840ad7: OUTPUT«===SORRY!===Cannot declare placeholder parameter @^_ in the mainline at line 1, near ""» | ||
09:08
[Coke] joined
|
|||
moritz | masak: would you prefer 'Cannot *use* placeholder parameter"? | 09:09 | |
09:11
fngraph joined,
fngraph left
|
|||
masak | yes, I think that would help a lot. | 09:14 | |
because placeholder parameters aren't declared, really. that's why we have them. | |||
dalek | kudo/nom: b7af9ff | moritz++ | src/Perl6/Actions.pm: improve error message, masak++ |
09:16 | |
moritz | masak: it's nearly as easy to change such things as to whine about them :-) | 09:17 | |
s/whine/complain/ | |||
masak | good to know. | ||
moritz | the misreporting of @_ as @^_ might be less trivial to fix, but shouldn't be too hard either | 09:18 | |
masak | although (1) at this point, I have complaining down to a fine art, and (2) there's still a bit of a threshold to start making commits while doing $dayjob. | 09:19 | |
09:22
Vlavv_ joined
09:25
Vlavv` left
09:30
orafu left,
replore left
09:32
orafu joined
09:35
GlitchMr left
09:42
wamba joined
09:43
woosley left
|
|||
moritz | nom: say -Inf cmp -Inf | 09:43 | |
p6eval | nom 840ad7: OUTPUT«0» | ||
moritz | nom: say -Inf cmp '-Inf' | 09:44 | |
p6eval | nom 840ad7: OUTPUT«-1» | ||
moritz | nom: say '-Inf'.Numeric | ||
p6eval | nom 840ad7: OUTPUT«-Inf» | ||
moritz | teh fun | ||
don't worry, I'm about to fix it | |||
t/spec/S32-io/IO-Socket-INET.t is sooo slow | 09:53 | ||
10:01
pothos left
10:02
pothos_ joined,
pothos_ is now known as pothos
10:06
envi_ joined
10:15
ggoebel joined
10:16
mishin left
|
|||
dalek | kudo/nom: bbe823d | moritz++ | src/Perl6/Actions.pm: avoid @_ being reported as @^_ It seems easier to pass the full variable name to add_placeholder_parameter than to reconstruct it from sigil, identifier and the twigil |
10:17 | |
10:17
sirmacik left,
sirmacik joined
10:39
f00li5h left
10:45
colomon joined
11:07
tokuhiro_ joined
|
|||
dalek | kudo/nom: 4f19b79 | Coke++ | t/spectest.data: run unfudged test |
11:12 | |
masak | [Coke]: LTA-class or not, if a ticket is too vague to have an observable, please flag it as problematic. | 11:14 | |
[Coke]: I know I sometimes make assumptions when posting tickets. I try not to. | |||
tadzik | good morning, herd | ||
in what time is #phasers today? | 11:17 | ||
11:17
colomon left
|
|||
masak | tadzik: it was 17:30 UTC last week. | 11:20 | |
tadzik | hmm | 11:23 | |
so it's in the middle of my lectures / | |||
:/ | 11:24 | ||
if I count correctly | |||
bbl | |||
masak | those are late classes. | 11:25 | |
tadzik | aye | 11:26 | |
whole day free, and one lecture 18-20 | |||
it'd better be an interesting one | |||
moritz | nom: say <foo bar baz>.min | 11:31 | |
p6eval | nom bbe823: OUTPUT«bar» | ||
moritz | the current implementation in nom does that by setting a tracker to +Inf | 11:32 | |
then using $tracker cmp $elem on each, and relies on that facth that +Inf cmp's higher than any other element | |||
nom: say 'f' cmp 'I' | 11:33 | ||
p6eval | nom bbe823: OUTPUT«1» | ||
moritz | nom: say 'foo' cmp 'Inf' | ||
p6eval | nom bbe823: OUTPUT«1» | ||
moritz | nom: say 'foo' cmp '-Inf' | ||
p6eval | nom bbe823: OUTPUT«1» | ||
moritz | ... and it coerces both arguments to .Numeric first, to see if one of them is Inf or -Inf | 11:34 | |
which goes horribly wrong in some cases | |||
nom: class A { has $.s handles <Str> }; say (A.new(:s<a>), A.new<:s<b>).min | 11:35 | ||
p6eval | nom bbe823: OUTPUT«Method 'at_key' not found for invocant of class 'A' in method postcircumfix:<{ }> at src/gen/CORE.setting:1018 in block <anon> at /tmp/Dps1k06ACJ:1 in <anon> at /tmp/Dps1k06ACJ:1» | ||
11:35
satyavvd left
|
|||
moritz | nom: class A { has $.s handles <Str> }; say (A.new(:s<a>), A.new(:s<b>).min | 11:35 | |
p6eval | nom bbe823: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1» | ||
moritz | nom: class A { has $.s handles <Str> }; say (A.new(:s<a>), A.new(:s<b>)).min | ||
p6eval | nom bbe823: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are::(Mu, Mu %_) in method Numeric at src/gen/CORE.setting:608 in sub infix:<==> at src/gen/CORE.setting:1993 in sub infix:<cmp> at src/gen/CORE.setting:1036 in method reify at… | ||
moritz | so that happens because cmp looks if $a == Inf etc. | 11:36 | |
masak | moritz: maybe Inf should really be a Num, but in all other cases (Int, Str, etc) it stands in for something meaning "always wins in a comparison". | ||
well, not always. not against Inf, I guess. | |||
11:37
Psyche^ joined
|
|||
moritz | masak: but then we need a better to check if something is an Inf | 11:37 | |
nom: class A { has $.s handles <Str> }; say A.new(:s<a>) == Inf | 11:38 | ||
p6eval | nom bbe823: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are::(Mu, Mu %_) in method Numeric at src/gen/CORE.setting:608 in sub infix:<==> at src/gen/CORE.setting:1993 in block <anon> at /tmp/PkejLY3KPA:1 in <anon> at /tmp/PkejLY3KPA:… | ||
moritz | nom: class A { has $.s handles <Str> }; say A.new(:s<a>).?Numeric == Inf | ||
p6eval | nom bbe823: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are::(Mu, Mu %_) in method Numeric at src/gen/CORE.setting:608 in method dispatch:<.?> at src/gen/CORE.setting:719 in block <anon> at /tmp/5htm48hpin:1 in <anon> at /tmp/5htm48… | ||
11:38
kaleem left
|
|||
moritz | somehow I liked the old .? semantics better | 11:38 | |
masak | huh? .?Numeric fails with an error? and that's the "new semantics"? | 11:39 | |
moritz | masak: yes, because there a Mu.Numeric, which it finds | 11:40 | |
11:41
Patterner left,
Psyche^ is now known as Patterner,
GlitchMr joined
|
|||
moritz | tl;dr I have no idea how to fix infix cmp | 11:42 | |
11:46
replore joined
|
|||
masak | it's the same fundamental issue as with sorting: we basically have no idea how to factor types into it all. | 11:47 | |
nom: say Mu.Numeric | 11:48 | ||
p6eval | nom bbe823: OUTPUT«Use of uninitialized value in numeric context0» | ||
masak | nom: say Mu.new.Numeric | ||
p6eval | nom bbe823: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are::(Mu, Mu %_) in method Numeric at src/gen/CORE.setting:608 in block <anon> at /tmp/jRZGlh0zm5:1 in <anon> at /tmp/jRZGlh0zm5:1» | ||
masak | huh. | ||
moritz | that's intentional | ||
masak | it's a Liskov smell, at least. | 11:49 | |
moritz | you basically never want to numify a type object to anything else than 0 | ||
flussence | wow, I left tryrakudo on its own for a few weeks... and it's still running | ||
moritz | flussence: does it run on nom already? | 11:50 | |
flussence | er, lemme check (I think so) | ||
oh, nope | |||
2011.02-4-g14319fc | |||
shouldn't be too hard to fix... | |||
moritz | probably just involves uploading a src/gen/CORE.setting.pir to feather3 | 11:51 | |
flussence | oh wait, it's slightly more involved since the safe mode stuff changed | ||
moritz | it got easier :-) | ||
but yes, it still needs adaption | 11:52 | ||
11:54
bluescreen10 joined
11:55
baest left
11:56
baest joined
|
|||
dalek | kudo/nom: ff78b5b | moritz++ | tools/build/Makefile.in: clean up CORE.setting |
11:58 | |
masak | moritz++ # tireless improvements | ||
12:06
preflex left
|
|||
masak | biggest beef I have with irssi so far, after using it for half a day, is that the input buffer is separate from the channel discussion. | 12:07 | |
12:07
preflex joined
|
|||
masak | which is totally irrational, since it has no bearing at all on what can and can't be done. it's just a presentational thing. | 12:08 | |
12:17
bluescreen10 left
|
|||
masak | today's mini-challenge: write a "template system" in as little code as possible. | 12:18 | |
it should take as input a template and a bunch of key-value mappings to be replaced. | 12:19 | ||
12:19
bluescreen10 joined
|
|||
masak | the exact format of the template and the way the key-value mappings are replaced are left open for easier golfability. | 12:19 | |
moritz | so just interpolate variables, no ifs/loops/whatever? | 12:20 | |
masak | right. | 12:26 | |
moritz | masak: gist.github.com/1264326 | 12:34 | |
note that with a bit fewer bells and whistles, that would be just %args{$0} | 12:35 | ||
masak | will look, will just post my variant first :) | 12:36 | |
nom: my $t = q[%foo% %bar% %foo% %baz%]; my %b = foo => 1, bar => 2, baz => 3; $t.=subst("%{.key}%", .value, :g) for %b.pairs; say $t | |||
p6eval | nom 4f19b7: OUTPUT«Method 'key' not found for invocant of class 'Any' in block <anon> at /tmp/_FcaSjNVCT:1 in block <anon> at /tmp/_FcaSjNVCT:1 in method reify at src/gen/CORE.setting:3749 in method reify at src/gen/CORE.setting:3654 in method reify at src/gen/CORE.setting:365… | ||
moritz | the &filter is for injecting HTML escaping etc. | ||
masak | moritz: nice! | 12:37 | |
b: my $t = q[%foo% %bar% %foo% %baz%]; my %b = foo => 1, bar => 2, baz => 3; $t.=subst("%{.key}%", .value, :g) for %b.pairs; say $t | |||
p6eval | b 1b7dd1: OUTPUT«1 2 1 3» | ||
masak | what's wrong with nom here? | 12:38 | |
[Coke] | moritz++ 738 tickets; 40 blocking on tests. | ||
moritz | I'm not sure it's actually wrong | ||
maybe it is | |||
masak: it doesn't give the block inside the string a $_ | |||
[Coke] calls that "under 700 ``real'' tickets, but needs a better word. | 12:39 | ||
moritz | nom: { .say }.() | ||
p6eval | nom 4f19b7: OUTPUT«Any()» | ||
[Coke] feels dirty using fake ascii double quotes. ;) | |||
moritz | nom: $_ = 'foo'; { .say }.() | ||
p6eval | nom 4f19b7: OUTPUT«foo» | ||
moritz | nom: $_ = 'foo'; "{ .say }" | ||
p6eval | nom 4f19b7: OUTPUT«foo» | ||
moritz | huh | ||
nom: $_ = 'foo'; "{ .say }" for $_ | |||
p6eval | nom 4f19b7: OUTPUT«foo» | ||
moritz | b: my $t = q[%foo% %bar% %foo% %baz%]; my %b = foo => '%bar%', bar => '%foo%', baz => 2; $t.=subst("%{.key}%", .value, :g) for %b.pairs; say $t | 12:40 | |
p6eval | b 1b7dd1: OUTPUT«%foo% %foo% %foo% 2» | ||
moritz | masak: are you sure you want that semantics for your template system? | ||
:-) | 12:41 | ||
the first rule of parsing is that you avoid multi-pass parsing. | |||
... with exceptions :-) | 12:42 | ||
[Coke] | ... parse club. you should say "parse club." | ||
moritz | [Coke]: you're right :-) | ||
[Coke] | rakudo: class A { has $.a, $.b; }; A.new(a => 1, b => 10); | 12:43 | |
p6eval | rakudo 4f19b7: OUTPUT«Null PMC access in find_method('b') in <anon> at /tmp/1VU50j3jQh:1 in block <anon> at /tmp/1VU50j3jQh:1 in <anon> at /tmp/1VU50j3jQh:1» | ||
dalek | ecza: 23f1b2e | (Paweł Murias)++ | lib/ (2 files): remove debugging statements |
12:44 | |
12:44
pmurias joined
12:45
GlitchMr left
|
|||
[Coke] does a niecza spectest and sees that things did not stay where he put them. | 12:45 | ||
[Coke] suspects people are, like, adding new tests and stuff. | |||
masak | moritz: for sure, it's a tradeoff between minimalism and that weird multi-pass behavior. I should probably use .trans instead. | 12:46 | |
moritz | [Coke]: I'm usually not very good at testing my spectest changes with niecza first | 12:47 | |
[Coke]: otoh I'm fine with cleaning up tests or rakudo when somebody adds tests for niecza | 12:48 | ||
12:48
benabik left
|
|||
masak | b: my %b = foo => 1, bar => 2, baz => 3; say .key for %b.pairs | 12:48 | |
p6eval | b 1b7dd1: OUTPUT«foobarbaz» | 12:49 | |
masak | nom: my %b = foo => 1, bar => 2, baz => 3; say .key for %b.pairs | ||
p6eval | nom 4f19b7: OUTPUT«foobarbaz» | ||
masak | moritz: I still don't get why my mini-templating system works on b but not on nom. | ||
moritz | nom: my %b = foo => 1, bar => 2, baz => 3; say "{.key}" for %b.pairs | ||
p6eval | nom 4f19b7: OUTPUT«Method 'key' not found for invocant of class 'Any' in block <anon> at /tmp/Jsj9_WhUJ_:1 in block <anon> at /tmp/Jsj9_WhUJ_:1 in method reify at src/gen/CORE.setting:3749 in method reify at src/gen/CORE.setting:3654 in method reify at src/gen/CORE.setting:365… | ||
moritz | b: my %b = foo => 1, bar => 2, baz => 3; say "{.key}" for %b.pairs | ||
p6eval | b 1b7dd1: OUTPUT«foobarbaz» | ||
moritz | nom: say "{.key}" given a => b | ||
p6eval | nom 4f19b7: OUTPUT«Could not find sub &b in block <anon> at /tmp/c5YU2FpqXA:1 in <anon> at /tmp/c5YU2FpqXA:1» | ||
moritz | nom: say "{.key}" given a => 1 | ||
p6eval | nom 4f19b7: OUTPUT«Method 'key' not found for invocant of class 'Any' in block <anon> at /tmp/2uyJfcJMNu:1 in block <anon> at /tmp/2uyJfcJMNu:1 in block <anon> at /tmp/2uyJfcJMNu:1 in <anon> at /tmp/2uyJfcJMNu:1» | ||
moritz | b: say "{.key}" given a => 1 | 12:50 | |
p6eval | b 1b7dd1: OUTPUT«a» | ||
moritz | nom: $_ = a => 1; say "{.key}" | ||
p6eval | nom 4f19b7: OUTPUT«a» | ||
masak | odd, no? | ||
moritz | yes, seems like topicalization by 'given' and 'for' does something differently | ||
12:51
pmurias left
|
|||
moritz | ... different than $_ assignment, that is | 12:51 | |
masak submits rakudobug | |||
12:52
tokuhiro_ left
12:53
Sarten-X left
|
|||
[Coke] | there are many new failures in the spec test on niecza which make me think the new tests are wrong. | 12:57 | |
for example: S06-traits/is-rw.t | |||
nok eval('foo(28)'), 'is rw requires a variable'; | 12:58 | ||
this causes niecza to die with: | |||
Unhandled Exception: Binding $a is rw in MAIN foo, cannot bind read-only value to is rw parameter | |||
is the test wrong there, or niecza? | 12:59 | ||
13:00
im2ee joined
13:01
Sarten-X joined
13:02
cosimo left
|
|||
im2ee | Hello! :) | 13:09 | |
Woodi | hi im2ee | 13:10 | |
[Coke]: from what are listen std can answer such questions | 13:11 | ||
std: eval('foo(28)') | |||
p6eval | std 20ae3bd: OUTPUT«ok 00:01 120m» | ||
[Coke] | Woodi: no, std is just a parser. | 13:12 | |
Woodi | then no idea what you ask about :) | ||
[Coke] | doesn't help when you're trying to decide how an eval should fail. | ||
phenny: tell sorear that when I fudge roast for niecza, he should definitely check to make sure he's happy with the new tests. | 13:13 | ||
phenny | [Coke]: I'll pass that on when sorear is around. | ||
[Coke] | there. buck passed. | ||
Woodi | [Coke]: then it looks like something like anti-wiki :) | ||
13:14
cosimo joined
13:15
benabik joined
13:16
Tene joined
|
|||
masak | [Coke]: &eval doesn't catch excceptions any more, so to me it looks like the test is wrong, yes. | 13:16 | |
13:18
cosimo_ joined
13:19
tzhs joined
|
|||
Woodi | b: my $a = 1; say $a.undef.defined | 13:24 | |
p6eval | b 1b7dd1: OUTPUT«Method 'undef' not found for invocant of class 'Int' in main program body at line 22:/tmp/FTec92shi6» | ||
Woodi | nom: my $a = 1; say $a.undef.defined | ||
p6eval | nom ff78b5: OUTPUT«Method 'undef' not found for invocant of class 'Int' in block <anon> at /tmp/WNUtMR_pYC:1 in <anon> at /tmp/WNUtMR_pYC:1» | ||
Woodi | std: my $a = 1; say $a.undef.defined | 13:25 | |
p6eval | std 20ae3bd: OUTPUT«ok 00:01 122m» | ||
Woodi | std: my $a = 'a'; say $a.undef.defined | ||
p6eval | std 20ae3bd: OUTPUT«ok 00:01 122m» | ||
Woodi | b: my $a = 'a'; say $a.undef.defined | ||
p6eval | b 1b7dd1: OUTPUT«Method 'undef' not found for invocant of class 'Str' in main program body at line 22:/tmp/lU3Rjb0ZET» | ||
masak | Woodi: STD won't tell you when a method doesn't exist. | 13:26 | |
it's just a parser. | |||
Woodi | b: my $a = 'a'; $a = Any; say $a.defined | ||
p6eval | b 1b7dd1: OUTPUT«Bool::False» | ||
masak | std: my $a = 1; $a.completely-made-up-method-name | ||
p6eval | std 20ae3bd: OUTPUT«ok 00:01 122m» | ||
Woodi | k | 13:27 | |
b: my $a = 'a'; undef $a; say $a.defined | 13:28 | ||
p6eval | b 1b7dd1: OUTPUT«===SORRY!===Unsupported use of undef as a verb; in Perl 6 please use undefine function or assignment of Nil at line 22, near " $a; say $"» | ||
Woodi | b: my $a = 'a'; undefine $a; say $a.defined | ||
p6eval | b 1b7dd1: OUTPUT«Bool::False» | ||
Woodi | tada | ||
masak | nom: my $a = 'a'; undefine $a; say $a.defined | 13:29 | |
p6eval | nom ff78b5: OUTPUT«Bool::False» | ||
Woodi | b: my $a = 'a'; undefine $a; say $a.perl | 13:30 | |
p6eval | b 1b7dd1: OUTPUT«Any» | ||
Woodi | sub a{ return undefine }; say a.perl | 13:31 | |
b: sub a{ return undefine }; say a.perl | |||
p6eval | b 1b7dd1: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in 'undefine' at line 606:src/gen/core.pm in 'a' at line 22:/tmp/Vg60EQJ50P in main program body at line 22:/tmp/Vg60EQJ50P» | ||
Woodi | nom: sub a{ return undefine }; say a.perl | 13:32 | |
p6eval | nom ff78b5: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub undefine at src/gen/CORE.setting:7467 in sub a at /tmp/jIK5ew30wq:1 in block <anon> at /tmp/jIK5ew30wq:1 in <anon> at /tmp/jIK5ew30wq:1» | ||
masak | 'undefine' is a function, expecting 1 argument. | ||
Woodi: you seem to assume it's a term. | |||
Woodi | it's not right for me | ||
dalek | ast: 2f1dec0 | Coke++ | S0 (10 files): niecza fudging |
||
Woodi | perl5: sub a{ return undef }; print a() | 13:33 | |
[Coke] | ok. if anyone updates those tests, I'd appreciate a retry in niecza. I guess I just need to auto-smoke after roast updates. | ||
Woodi | is any v5 daemon here ? :) | ||
masak | Woodi: 'undef' is both a term and a function in Perl 5. in Perl 6, the term is now Any (and other type objects), and 'undefine', respectively. | 13:34 | |
Woodi do not like this | |||
masak | s/, and/, and the function is/ | ||
Woodi | 'return Any' looks strange... | ||
masak | Woodi: feel free to explain why you do not like it. I like it. | ||
or 'return Str' if your function is supposed to return a Str. | 13:35 | ||
or 'fail'. | |||
or 'die "something went wrong"' | |||
Woodi | becouse i learned from Perl5 and 'return undef' was perfect, clear, etc | ||
[Coke] | Some things are going to change. Sorry. | 13:36 | |
Woodi | but why change good things ?? | ||
to many mantras IMO | |||
masak | Woodi: you can't just come into #perl6 and ask "but why change good things ??" :P | 13:38 | |
it's our job to take an essentially good thing -- Perl 5 -- and change it for the better. | |||
huf | Woodi: also, in perl5 return undef was most probably a bug :) | 13:39 | |
masak | these changes are often done with good reason. if the reason turned out to be less than good, we usually make a better change later. | ||
huf: there's that, too. | |||
Woodi: when would you do 'return undef' rather than 'return' in Perl 5? | 13:40 | ||
Woodi | return returns truth i think... | ||
huf | you think wrong | 13:41 | |
but i think in this case the best you can do is figure out how undefs work and why it was split into many things in p6 before pronouncing judgement | |||
masak | perl6: say defined foo; sub foo { return } # Woodi: observe | 13:42 | |
p6eval | rakudo ff78b5, niecza v10-38-g23f1b2e: OUTPUT«Bool::False» | ||
..pugs: OUTPUT«» | |||
huf | masak: a bare return is short form for what in p6? | 13:43 | |
in p5 it was return () iirc | |||
masak | Woodi: I'd be happy to explain why Perl 6 has two things where Perl 5 has only one. but as huf says, it's more urgent that you know about how undefs work in Perl 5. :) | ||
huf: 'return Nil' | |||
IIUC. | |||
and Nil is short for a kind of undef () | 13:44 | ||
Woodi | huf: "RFC 28: Perl should stay Perl" and: "The essence of Perl is really context sensitivity, not just to syntactic context, but also to semantic, pragmatic, and cultural context." | ||
huf | masak: Nil is what? empty list in list ctx and some form of undef in item | ||
? | |||
Woodi: yes? | 13:45 | ||
Woodi | after all Perl6 is descendant of Perl5 and good things should stay | ||
masak | huf: yes, something very much like that. | ||
huf | you've just demonstrated that you dont understand how the supposed good think in p5 works | ||
Woodi: how *exactly* do you want it to stay the same in p6 if you dont know what it is? | |||
masak | huf: it's an object representing "could've got a list of things here, but got nothing, not even an empty list" | ||
huf | masak: ah, Nil is emptylister than ()? heheh :D | 13:46 | |
snarkyboojum | thank goodness for good error messages | ||
std: undef | |||
p6eval | std 20ae3bd: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, :!defined as a matcher, Any:U as a type constrain… | ||
masak | snarkyboojum++ | ||
Woodi | huf: how you think, why Perl is/was so popular ? :) becouse some clear things like "return undef" JUST WORKS | ||
huf | Woodi: but i'm telling you it's most likely a big in p5. | 13:47 | |
masak | Woodi: as huf points out, you're making a bit of a fool of yourself by claiming that Perl 6 should be like Perl 5, and then demonstrating your lack of insight into how Perl 5 actually works. | ||
[Coke] | Woodi: there is always perl5, and you are, of course, welcome to keep using it if you don't want to learn more about six. | ||
13:47
localhost left
|
|||
Woodi | allPpls: i think perl5 wasn't perfect and this is my reason to involwing in v6. but "what was worked will stay" - cannot find exact citation... | 13:48 | |
mux | reminds me of yesterday, when someone who had broken his FreeBSD system for not properly following 3rd party apps update instructions, claimed that FreeBSD is broken, that versioned shared libs are too, and that I was an idiot for not believing him | ||
13:49
localhost joined
|
|||
masak | Woodi: you keep assuming that 'undef' was working as it was. | 13:49 | |
PerlJam | Woodi: "return undef" is often a code smell anyway | ||
Woodi | yes, masak, it was working perfect. | 13:50 | |
huf | so i suppose there's no possibility that other people have more insight than you | ||
Woodi | why it is smell ? | ||
huf | Woodi: because list context. it's almost surely not what you want. | ||
Woodi | huf: pls enlight me :) | ||
masak | Woodi: what type would 'undef' have in Perl 6? | 13:51 | |
Woodi | example: | ||
masak | Woodi: remember that it can be returned from any function, even those that return Str or Int or DateTime. | ||
Woodi | sub a{ return undef } | ||
masak | auugh | 13:52 | |
PerlJam | masak: careful ... he'll just invoke "magic" with a handwave. | ||
masak | Woodi: you're not listening. | ||
huf | Woodi: sub x { return undef } if (x()) { works as expected } my @x = x(); if (@x) { surprise } | ||
masak | Woodi: why are you using 'return undef' there, and not just 'return'? | ||
huf | Woodi: but that's just explicit return undef, not really the core issue here | ||
Woodi | then it works for: scalars, hashes, lists, bools - it Perl philosophy | ||
mux | lol | ||
people have just shown you how it doesn't really work for lists | 13:53 | ||
huf | Woodi: p6 has more types than that... | ||
masak | Woodi: are you not reading what people are telling you? | ||
mux | I love people who have the nerve to dispute what perl's philosophy is, with people who are the main contributors to the language | ||
masak | Woodi: a conversation has to be a bit of give-and-take. you have to react to what we tell you, too. | ||
Woodi | mux: then it should be better in v6 :) | ||
masak hugs Woodi | 13:54 | ||
Woodi | thanx :) | ||
masak | I think I needed that more than you did. | ||
PerlJam | #perl6 ... where you get a hug even if we suspect you're a troll :) | ||
mux | group hug? | ||
moritz | [Coke]: oh, my fault. eval() in rakudo catches exceptions, in niecza it doesn't | ||
Woodi | mux: contribution does not matter, using Perl matters | 13:55 | |
masak | Woodi: you're using it wrong :) | ||
mux | whatever | ||
moritz | [Coke]: and I suppose niecza is correcter here | 13:56 | |
Woodi | PerlJam: you think i am trolling here ? | ||
masak | Woodi: *I* think you're trolling here. | 13:57 | |
Woodi: but I also think you are not aware you are. | |||
PerlJam | Woodi: in any case, if your subroutine is likely to be used in both scalar and list contexts, you should use just "return;" to mean "give nothing back", otherwise if you use "return undef;" in list context, you end up with a one element list containing a single undef value. | ||
mux | it's very hard to differentiate an ignorant person and a successful troll | ||
Woodi | i think i just have other thinking | ||
mux | I for one just think you have no clue what you're talking about | ||
snarkyboojum | I've learned something from this convo anyway, undef isn't typed enough for Perl 6, that seems to be a big part of it, so you return Mu or Nil or an undefined type object | ||
masak | what mux said. | ||
I'm glad I reached snarkyboojum++ :) | 13:58 | ||
snarkyboojum | maybe not 100% right, but seems to be part of it :D | ||
masak | then this conversation wasn't a total waste. | ||
snarkyboojum | masak++ for general learnedness ;) | ||
moritz | niecza: try eval('1 1') | ||
p6eval | niecza v10-38-g23f1b2e: ( no output ) | ||
moritz | niecza: eval('1 1') | ||
p6eval | niecza v10-38-g23f1b2e: OUTPUT«Unhandled Exception: Two terms in a row at (eval) line 1:------> 1 ⏏1 at /home/p6eval/niecza/lib/CORE.setting line 1938 (CORE eval @ 4)  at /tmp/WlCFX9p4gO line 1 (MAIN mainline @ 1)  at /home/p6eval/niecza/lib/CORE.setting line… | ||
Woodi | no. return Any, or return Mu is just to many headache for language like Perl | ||
moritz | so, return; then | 13:59 | |
Woodi | but i will leave this subject now | ||
snarkyboojum | Woodi: well just a return from a sub will return Nil anyway, so you're all good :) | ||
masak | Woodi: JUST USE 'return;' IN EITHER PERL 5 OR 6, YOU F-ING MORON | ||
flussence blinks | |||
PerlJam | masak: Hmm. Do you need another hug? | ||
masak | Woodi: WE'VE BEEN TELLING YOU THIS FOR HALF AN HOUR, DAMMIT | ||
huf | ... how is returning anything a headache?! | ||
wat. | |||
masak | PerlJam: hug didn't help. letting of steam might've. | 14:00 | |
PerlJam hugs masak anyway | |||
masak | thanks. :/ | ||
flussence | well someone was going to do it eventually. | 14:01 | |
snarkyboojum | I think Woodi is just grappling with the idea - no hard feelings eh :D | ||
huf | wish we had mst here ;) | ||
masak | I agree that might not have been very #perl6-y. not sure it helped either me or Woodi, either. | ||
huf | masak: it makes this channel more believable | 14:02 | |
masak | Woodi: for what it's worth, I don't think you're a moron. I think in this particular discussion, you have comprehension problems. | ||
huf | you're all too friendly and patient | ||
masak | Woodi: as in, it's not us (or Perl 6), it's you. | ||
moritz | huf: it works on the vast majority of subjects in our secrect psychology study :-) | ||
[Coke]: I'll try to fix some of that fallout tonight | 14:03 | ||
masak | I confess that shouting was my second recourse, after realizing that I don't have op powers. | ||
moritz | you... don't? | ||
14:04
ChanServ sets mode: +o moritz,
moritz sets mode: +o masak,
moritz sets mode: -o moritz
|
|||
masak | thanks. | 14:04 | |
flussence | kicking people is never the correct answer, unless you're making a ruby joke. | ||
PerlJam | I think Woodi is just victim of the same disease of those people who say "Perl 6 isn't Perl because it uses a . instead of a ->" (i.e., not a deep enough understanding of the essence of the language) | ||
masak | PerlJam: aye, probably. | ||
moritz | PerlJam: one problem is that Woodi is voicing strong opinions, but doesn't know much about perl 6, and has even admitted that here | 14:05 | |
masak | PerlJam: it's very naive to come in, pick a feature, and start yelling "you promised you wouldn't change the good parts", though. | ||
moritz | PerlJam: it's a form of agression | ||
snarkyboojum | except in this case the issues of definedness and types is a little deeper than syntactic changes from -> to . | ||
masak | they are. | ||
mux | I think what's really naive (and actually moronic) is not being able to realize you don't have the necessary knowledge of something to actually argue with people who obviously know what they're talking about | 14:06 | |
snarkyboojum | maybe I'm too charitable, but I reckon he was genuinely trying to grok it :D | ||
masak | fwiw, I still feel a little strange when I do 'return Str' or similar. | ||
my bet is that not many people have run into this situation yet. | |||
Woodi | masak: this wasn't only about 'return'. i was about to eagerly dropping things that works ok in v5. perl5 ppls want perl6 too. and new ppls in Perl community, like you, do not understand that | ||
moritz | masak: yep, but it doesn't happen often | ||
PerlJam | Hmm. | ||
moritz | Woodi: fwiw undef wasn't eagerly dropped. It was dropped after years of trying to figure out what 'undef' actually means, and realizing it doesn't have a meaning | 14:07 | |
in Perl 6, that is | |||
snarkyboojum | Woodi: I guess the message was that there are good reasons for why the change has happened, and they're probably a little subtle | ||
masak | Woodi: I agree there's a general risk of changing "too much". but "undef" isn't such a case. | ||
moritz | masak: in the end you usually want to fail() instead of return Str; | ||
masak | aye. | ||
I think so too. | |||
PerlJam | Woodi: everything that has changed in Perl 6 from Perl 5, has done so after quite a fair bit of thought. Sometimes they've changed several times before we've gotten where we are today. | ||
masak | Woodi: you've undermined yourself somewhat in this discussion by defending 'return undef' when people have been telling you (repeatedly) that it's probably an error to use it. | 14:08 | |
flussence | two errors, actually: perl -wle 'sub x { return undef }; my %x = x()' | 14:09 | |
:) | |||
masak | Woodi: but even aside from that, 'undef' was changed for really good reasons, IMO. | ||
Woodi | moritz: first notice i was asking about how to do 'return undef'. before i tested 'return' probably someone advised to use 'return Any' and that is not what i expect form Perl. and then discussion started. | ||
[Coke] wonders if we can get a perl5 mode for evalbot. | |||
moritz | [Coke]: buubot_backup has a perl 5 mode | ||
buubot_backup: eval: undef + 2 | |||
buubot_backup | moritz: ERROR: Can't modify constant item in undef operator at (eval 20) line 2, at EOF | ||
PerlJam | Woodi: in any case ... we're not the ones you need to convince if you want to make a change in Perl 6. We're not the language designer. | ||
moritz | PerlJam: we are :-) | 14:10 | |
at least a subset of them | |||
PerlJam | moritz: shh :) | ||
masak | PerlJam: didn't you get the memo? :P | ||
moritz | to /return/ to a more technical issue, I'm now trying to make rakudo not catch exceptions in eval() | ||
it's been spec not to catch for some time | |||
and niecza doesn't catch | |||
masak | ++morotz | ||
augh | |||
++moritz | 14:11 | ||
moritz | and the mismatch between the two causes maintenance nightmares in roast | ||
snarkyboojum | Niecza does perl5 bits and bobs now eh.. not sure if that's p6eval'able | ||
moritz | snarkyboojum: I'd rather not, it probably doesn't have a safe mode :-) | 14:12 | |
masak | Woodi: we have types in Perl 6. that's the main reason 'undef' had to change. | ||
snarkyboojum | Woodi: lots of juicy reading in the perl6-language archives fwiw e.g. osdir.com/ml/perl6-language/2009-11...00075.html | ||
dalek | kudo/eval-throws: 741a933 | moritz++ | src/core/control.pm: Do not catch exceptions from eval() |
||
masak | Woodi: that's also the main reason 'wantarray' had to go. | ||
snarkyboojum | moritz: good point :) | ||
flussence | while we're on an error-handling topic, I want to whine about rakudo's Test.pm: gist.github.com/1179681 | 14:13 | |
PerlJam | masak: They were warts on the flesh of context-sensitivity? | ||
masak | PerlJam: :) | 14:14 | |
moritz | flussence++ | ||
snarkyboojum | Woodi: or rather the real spec on definedness perlcabal.org/syn/S02.html#Undefined_types # I will stop now :D | ||
masak | PerlJam: there wasn't any way to combine MMD and wantarray. and we liked MMD more :) | 14:15 | |
dalek | kudo/eval-throws: fa2d5c5 | moritz++ | lib/Test.pm: Test.pm needs to deal with eval() not catching exceptions |
14:23 | |
Woodi | masak: types are additional feature to 'automagic typing' - where it is possible | 14:24 | |
moritz | Woodi: that's bullshit | ||
Woodi: types are very deeply rooted in the language | |||
even if it doesn't always appear to be the case | 14:25 | ||
Woodi | moritz: i am just user | ||
mberends | Woodi: you might be interested in the history of the demise of undef. Here is the moment it became doomed: irclog.perlgeek.de/perl6/2009-11-24#i_1762914. Prior to that, it caused problems, for example irclog.perlgeek.de/perl6/2009-11-23#i_1760736. Mu and Nil were still to me named, as you will see if you read further. | ||
Woodi | and it works that way | ||
moritz | Woodi: if your argument is "i am just a user", don't participate in language design discussion | ||
mux | spot on. | ||
flussence | it helps if you've actually *used* the language too. | ||
moritz | Woodi: if you want to participate in those discussions, you can't be "just a user", but you need to actually understand the implications of stuff | 14:26 | |
masak | that's what makes language design both thrilling and frustrating :) | ||
usually the implications aren't understood until there's an implementation on which to try a feature out. | |||
mux | designing a language is science; not packing N 'cool' features together... | 14:27 | |
moritz | feedback is ok, but then please formulate it constructively | ||
PerlJam | mux: I disagree. Designing a languae is art :-) | ||
mux | PerlJam: heh. and quite a bit of that too yeah ;-) | ||
Woodi | moritz: 1. i do not say anything autoritary. OK ? | 14:28 | |
mux | that sentence alone just made my irony-meter explode | ||
moritz | Woodi: you basically say "$thing sucks". That's not constructive. | ||
Woodi | 2. real programmer feedback on Perl: types are additional feature to 'automagic typing' - where it is possible | ||
snarkyboojum | Woodi: as a user of a language type info can be very helpful.. perl 6 uses the idea of gradual typing - see 6guts.wordpress.com/2010/09/20/grad...alization/ | 14:29 | |
Woodi | moritz: i was wrong. just 'return' is better :) | ||
moritz | Woodi: ok, great | 14:30 | |
Woodi | snarkyboojum: it is what i say in details | ||
snarkyboojum | Woodi: there's lots of info out there for the inquisitive mind :) | ||
moritz | [Coke]: if you ack 'nok\s+eval' in roast, you get a list of moritzFAIL :-) | ||
Woodi was doing tee when you still yelling on me :) | 14:31 | ||
Woodi thinks forcing 'return Anything' is bad. but seems no one force this :) | 14:32 | ||
PerlJam | Woodi: Perl doesn't *force* anything. IT strongly encourages things, however. | 14:34 | |
Woodi: this is part of the essence of Perl. TMTOWTDI after all | |||
benabik is in the middle of backlogging, but... | 14:36 | ||
Does fail() return, or do you need to return fail? | |||
moritz | benabik: fail() returns | ||
benabik wonders why he asks when he has perl6 installed. | 14:37 | ||
masak | benabik: that habit is hard to break. :) | ||
at least you notice it, unlike most of p6l. :P | 14:38 | ||
benabik | Hm. The REPL isn't as robust as it could be. `sub foo { fail('bar') }; my $x = foo` just exited the REPL. It printed bar, but nothing else. | 14:39 | |
masak | actually, p6l has been mostly silent recently. not really living up to its reputation as a think tank. | ||
masak needs to re-ignite the 'rw attr' thread | |||
moritz | masak: it usually is quite the think tank if you inject a quesiton or idea | ||
felher | masak++ for macro-branch :D | ||
masak | benabik: we've had a bunch of those things. this particular one might be new. | 14:40 | |
benabik: want to report it to RT? | |||
benabik | masak: where's RT? | ||
masak | benabik: just email [email@hidden.address] about it. | ||
benabik | masak++ | 14:41 | |
masak | like magic, it'll turn into a bug report in the system :) | ||
14:43
DarkWolf84 joined
|
|||
DarkWolf84 | hello #perl6 | 14:43 | |
masak | DarkWolf84! \o/ | ||
DarkWolf84 | hi, masak | 14:44 | |
masak | felher: ooh, you've tried it out? any nice use-case yet? :) | ||
benabik golfs a bit. | |||
DarkWolf84 | nom: my $a = sub { return }; say $a; | 14:45 | |
p6eval | nom ff78b5: OUTPUT«_block1011» | ||
DarkWolf84 | is that corect? | ||
I think it shoud be Any | |||
benabik | nom: my $a = sub { return }; say $a() | 14:46 | |
p6eval | nom ff78b5: OUTPUT«Nil» | ||
benabik | DarkWolf84: The _block1011 is the (somewhat LTA) string for the sub. | ||
PerlJam | DarkWolf84: It should not be Any, but it certainly should not be "_block1011" | ||
14:47
daxim left
|
|||
benabik | I think it's probably supposed to be Code. | 14:48 | |
snarkyboojum | niecza is arguably more meaningful | ||
niecza: my $a = sub { return }; say $a; | |||
p6eval | niecza v10-38-g23f1b2e: OUTPUT«{ ... }» | ||
benabik | Er, Sub. | ||
snarkyboojum | or not :) | ||
benabik | The parrot object is leaking through. | 14:49 | |
snarkyboojum | I like it tho ;) | ||
benabik | nom: fail; say 'foo' | 14:50 | |
p6eval | nom ff78b5: OUTPUT«foo» | ||
benabik | nom: sub foo { fail; say 'foo' }; foo | ||
p6eval | nom ff78b5: ( no output ) | ||
felher | masak: Nope, sorry, had to learn for an exam. But i sure will. :) Will/did you blogpost about your branch? | ||
benabik | That seems odd. | ||
masak | felher: yes, as soon as I manage to get back on the horse again with blogging. | 14:51 | |
14:51
jaldhar left
|
|||
masak | somehow there's not as much time in a day as there used to be. | 14:51 | |
DarkWolf84 | masak: ok, it was the braces | 14:52 | |
masak | DarkWolf84: right, I should've told you. sorry :) | 14:53 | |
DarkWolf84 | so perl6 is context language like ever :) | ||
benabik | More concise... | ||
masak | I looked at that and thought "he probably meant to call it". forgot to mention it, though. | ||
DarkWolf84 | s/like ever/like perl 5/ | ||
benabik | nom: sub foo { fail; say 'foo' }; foo; fail; say 'bar' # I expect either "foo\nbar" or nothing, but get... | ||
p6eval | nom ff78b5: OUTPUT«bar» | ||
masak | DarkWolf84: it's not so much context here, as explicitly calling a variable. | 14:54 | |
DarkWolf84: to call &foo, you either have to do '&foo()' or 'foo'. | |||
DarkWolf84: with '$a', there's only the '$a()' option. | |||
DarkWolf84 | masak: but foo is just a sub not a closure | ||
14:55
kmwallio joined
|
|||
masak | DarkWolf84: the difference between sub and closure doesn't matter from the perspective of calling it. | 14:55 | |
benabik | nom: my &foo = sub { return }; my $bar; say &foo; say $bar; say &foo(); say $bar(); say foo | 14:56 | |
p6eval | nom ff78b5: OUTPUT«_block1011Any()NilMethod 'postcircumfix:<( )>' not found for invocant of class 'Any' in <anon> at src/gen/Metamodel.pm:3164 in block <anon> at /tmp/JpNnxJP95D:1 in <anon> at /tmp/JpNnxJP95D:1» | ||
benabik | Oh, forgot a step... | ||
nom: my &foo = sub { return }; my $bar = &foo; say &foo; say $bar; say &foo(); say $bar(); say foo | |||
p6eval | nom ff78b5: OUTPUT«_block1011_block1011NilNilNil» | ||
felher | masak: Sounds good to me. :) | 14:57 | |
masak | benabik++ | ||
felher: general plan: an introductory post about macros and what they are; then a post about the work with D1. | 14:58 | ||
benabik | _block1011 is still somewhat LTA. Code should probably .gist to '{ … }' or something | ||
14:58
GlitchMr joined
|
|||
benabik | Not sure how it's falling back to the parrot sub. | 14:58 | |
PerlJam | benabik: or ... the actual code :) | ||
jnthn | Because we want named subs to stringify to the name of the sub. | 14:59 | |
phenny | jnthn: 06:17Z <japhb> ask jnthn Can you make '$value but True' and '$value but False' work without too much trouble? This is coming up when trying to implement MAIN as per spec. | ||
jnthn: 06:18Z <japhb> tell jnthn sorear++ has found a workaround. A bit uglier, but the long form seems to work. | |||
jnthn | And it doesn't make sense to have our own slot for name when a Parrot sub has such a slot | ||
DarkWolf84 | nom: my $array_reff = <a b c>; $a.say; a.perl.say | ||
p6eval | nom ff78b5: OUTPUT«===SORRY!===Symbol '$a' not predeclared in <anonymous> (/tmp/EOPfxRFz_7:1)» | ||
DarkWolf84 | oops | 15:00 | |
jnthn | Probably should be more like <anon> or so though, rather than _block1234 | ||
PerlJam | jnthn: indeed. | ||
DarkWolf84 | nom: my $array_reff = <a b c>; $array_reff.say; array_reff.perl.say | ||
p6eval | nom ff78b5: OUTPUT«a b cCould not find sub &array_reff in block <anon> at /tmp/tx20zgbwCP:1 in <anon> at /tmp/tx20zgbwCP:1» | ||
jnthn | I can probably do something about it; file a ticket. | ||
PerlJam | DarkWolf84: missing a sigil | ||
jnthn | decommute & | ||
DarkWolf84 | again | 15:01 | |
nom: my $array_reff = <a b c>; $array_reff.say; $array_reff.perl.say | |||
p6eval | nom ff78b5: OUTPUT«a b c("a", "b", "c")» | ||
DarkWolf84 | ok | ||
felher | masak: Nice. *waitingForIt* :) | ||
15:01
SHODAN left
|
|||
DarkWolf84 | I really must try nom :) | 15:02 | |
TimToady | why do we want to stringify to just the name, when .name is available for that? | ||
15:03
baest left
|
|||
DarkWolf84 | PerlJam, I'm verry absend theese days | 15:04 | |
15:06
risou_awy is now known as risou
|
|||
DarkWolf84 | absent* | 15:06 | |
TimToady | in fact, I would argue that sub foo might stringify to &foo, and an anonymous function to just & | ||
masak | cute. | ||
perl6: sub foo {}; say &foo ~~ &foo | 15:07 | ||
p6eval | rakudo ff78b5, niecza v10-38-g23f1b2e: OUTPUT«Nil» | ||
..pugs: OUTPUT«» | |||
masak | hm. | ||
benabik | Nil? | ||
DarkWolf84 | O_O | ||
masak | perl6: sub foo { say "because it was run" }; say &foo ~~ &foo | ||
p6eval | rakudo ff78b5, niecza v10-38-g23f1b2e: OUTPUT«because it was runBool::True» | ||
..pugs: OUTPUT«because it was run1» | |||
DarkWolf84 | yeah i got it | 15:09 | |
nom: say Any ~~ Any | 15:10 | ||
p6eval | nom ff78b5: OUTPUT«Bool::True» | ||
DarkWolf84 | nope | ||
nom: say 0 ~~ 0 | 15:11 | ||
p6eval | nom ff78b5: OUTPUT«Bool::True» | ||
DarkWolf84 | ... | ||
oh, the refs are different | 15:12 | ||
TimToady | smartmatching is not symmetrical | ||
moritz | and nearly everything is Any | 15:13 | |
DarkWolf84 | i forgot ~~ is not == | ||
masak | nom: say Junction ~~ Any | ||
p6eval | nom ff78b5: OUTPUT«Bool::False» | ||
masak .oO( "I said *nearly* everything!" ) | 15:14 | ||
TimToady | nom: say Any ~~ :!defined | ||
p6eval | nom ff78b5: OUTPUT«Bool::True» | ||
DarkWolf84 | why Any is defined | ||
moritz | it is not | ||
TimToady | it's not | ||
moritz | that's the ! | ||
TimToady | or rather, it's ! | ||
benabik | nom: sub foo { 2 }; say 2 ~~ &foo | 15:15 | |
p6eval | nom ff78b5: OUTPUT«2» | ||
benabik | nom: sub foo { 2 }; say 1 ~~ &foo | ||
p6eval | nom ff78b5: OUTPUT«2» | ||
DarkWolf84 | my dad | ||
masak | are you talking about !? | ||
DarkWolf84 | my bad* | ||
moritz | nom: say so try { eval 'die "foo"' } | ||
p6eval | nom ff78b5: OUTPUT«Bool::False» | ||
moritz | I get a segfault with my local patch :( | 15:16 | |
nom: try { die "foo" }; say so $! | |||
p6eval | nom ff78b5: OUTPUT«Bool::True» | ||
moritz | am I right in assuming that exceptions should be False rather than True? | 15:17 | |
TimToady | benabik: you're exercising S03:3611 | ||
benabik | TimToady: I would almost expect a 0 arg sub to be called and then the result smart matched against... | 15:19 | |
Ignoring the LHS of ~~ is odd. (to me) | |||
TimToady | the left arg was already bound to $_, and the right arg was *already* called for the smartmatch, and the smartmatch found a Callable on the right, so it's entirely up to the Callable whether it pays attention to $_ or not | 15:21 | |
masak | moritz: I can't think of a reason they should. but maybe there is one? | ||
benabik | TimToady: Fair enough. | 15:22 | |
masak | moritz: also -- False and :!defined, or False but :defined? | ||
moritz | masak: not sure about defined | 15:25 | |
DarkWolf84 | will qregex implement LTM | 15:26 | |
? | |||
moritz | masak: my use case is that I want to write nok try { eval $string } | ||
masak: and try { } should return the exception on failure, afaict | |||
or should it return a Failure that wraps the exception? | |||
and then the Failure is neither .defined nor True? | |||
tadzik | wow, there have been shouts | ||
moritz | tadzik: not only shouts, but shouts by masak :-) | 15:27 | |
tadzik | I can barely imagine masak shoulting | ||
or even shouting | |||
DarkWolf84 | me too | ||
masak | me neither. | ||
tadzik hugs masak | 15:28 | ||
DarkWolf84 | the trols make mirakles sometimes | ||
masak | ...but if it gets me this many hugs, maybe I should start shouting more often... :) | ||
tadzik | I found it more like misunderstanding than trolling | ||
masak | oh, it was. | ||
tadzik | SOMEBODY HUG ME DAMNIT | ||
:) | |||
masak | a misunderstanding, I mean. | 15:29 | |
suddenly I found myself thinking of mst's post about "sometimes the only way to reach through to a person that wastes everybody's time is to shout at them". | |||
and then I tried it. | |||
benabik | masak: I'm not sure WWmstD is a good way to live your life. ;-) | 15:30 | |
masak | here's the post, by the way: www.shadowcat.co.uk/blog/matt-s-tro...a-bastard/ | ||
benabik: heh :) | |||
tadzik | lecturestime, will be a bit early and a bit late for #phasers today | ||
benabik | obey, I don't have a lecture today. I can be in #phasers! | 15:32 | |
15:33
tzhs left
|
|||
DarkWolf84 | ok, bb then | 15:40 | |
15:41
DarkWolf84 left
15:42
mkramer left
15:43
mkramer joined,
molaf left
|
|||
im2ee | Catalyst, Dancer or Mojolicious? :) | 15:47 | |
Which is the best one? | |||
flussence | I'd go with mojolicious, but I haven't used the middle one | 15:48 | |
masak | if I were to start a project today, I'd probably reach for Dancer. | ||
but I have nothing against the other two. | 15:49 | ||
im2ee | masak, so why Dancer? :) | ||
flussence | catalyst is like using a mountain to swat a fly | ||
im2ee | I'm looking for the easiest one.. I won't spend a lot of time for web development. :) | ||
masak | im2ee: Dancer seems very easy to get started with. | 15:50 | |
flussence | try.rakudo.org's frontend uses mojolicious, but it doesn't really do much with it besides render one page. | ||
masak | Catalyst seems to be very capable and have a dedicated community. the Catalyst community is likely the biggest of the three. | 15:51 | |
im2ee | So, i probably will use Dancer. :) | 15:52 | |
flussence | use all of them at the same time! | ||
im2ee | flussence, maybe i will. I must think it over. :) | 15:53 | |
flussence | .oO( hm, nobody's written an Acme::Cancerlicious yet ) |
15:54 | |
15:59
packetknife joined
16:00
colomon joined
|
|||
masak decommutes | 16:01 | ||
felher | If i have a array of hashes like { value => X, name => Y }, is there a common idom to get the maximum hash compared by hash<value>? | 16:03 | |
moritz | felher: max :by({ $^a<value> <=> $^b<value> }), @hashes | 16:04 | |
[Coke] | oooh. my coworker bought me some spicy padam. mmmm. | 16:05 | |
16:13
MayDaniel joined
|
|||
PerlJam | Would a Perl 6 version of Dancer be called Prancer? (and would that give the wrong impression? ;) | 16:13 | |
im2ee | PerlJam, why Prancer? :) | 16:14 | |
PerlJam | why not? | 16:15 | |
im2ee | ;) | ||
PerlJam | im2ee: btw, since you were polling, Dancer++ :) | ||
im2ee | So i will test it. :) | 16:16 | |
karma Dancer | |||
aloha | Dancer has karma of 1. | ||
moritz | im2ee: Mojolicious++ | ||
im2ee | moritz, why? :) | ||
karma Mojolicious | |||
aloha | Mojolicious has karma of 1. | ||
im2ee | :) | ||
The same karma. :) | |||
moritz | im2ee: because it works, and is fun | 16:17 | |
im2ee: and much easier to get started with than Catalyst | |||
(ok, that's not too hard :-) | |||
PerlJam | I've never used Mojolicious but from what I've read, it seems kind of like Catalyst re-imagined to be more like Dancer. | ||
im2ee | moritz, have You ever been using Dancer? :) | ||
_sri | mojolicious is more for people that love web development, not so much for those that just want to get away from it again as quick as possible (imo) | 16:18 | |
a key feature is real-time web apps | |||
PerlJam | _sri: yeah, it seems to have that "fun" thing going for it :) | ||
moritz | im2ee: no | ||
im2ee: which is why I don't comment on it | 16:19 | ||
PerlJam is hacking a Dancer app right now. | |||
_sri | i personally consider mojolicious my catalyst2 | 16:20 | |
im2ee | moritz, so.. i'll try both. :) | ||
felher | moritz: Thnx, but thats what i tried first (well, i actually tried @hashes.max: { $^a<value> cmp $^b<value } ), but it seems that one of the first two values that getting compared is -Inf, and Num<value> doesn't work :) | ||
moritz | felher: then try .sort({block}).[*-1] | 16:21 | |
_sri | but yea, you should love web development, or you won't appreciate either | 16:22 | |
felher | moritz: k, thnx :) My array is small enough so sort doesn't cost much, i guess :) | 16:23 | |
16:23
wolfman2000 joined
|
|||
colomon | #Phasers in 67? | 16:24 | |
PerlJam | _sri: what's a "real time web app" ? | ||
16:25
daniel-s left
|
|||
_sri | PerlJam: en.wikipedia.org/wiki/Real-time_web | 16:25 | |
Comet/WebSockets | 16:26 | ||
PerlJam | _sri: so, how does mojo support "real-time web" exactly? Just that it's fast and unobtrusive? | 16:27 | |
slavik1 | real time web = turning web browsers into thick clients ... | ||
moritz | PerlJam: websocket support | ||
[Coke] | (dancer,mojo,catalyst) I picked up mojo because of the screencasts, and it has been very very nice to me so far. | 16:28 | |
mberends | 2 | ||
PerlJam | [Coke]: I started watching them too, but I haven't done anything with Mojo yet. | ||
16:28
mkramer left
|
|||
[Coke] | PerlJam: if you wish to play, see: github.com/coke/muddle and maybe commit some stuff. ;) | 16:29 | |
ugh, haven't touched it since 9/21. | |||
16:31
envi_ left
|
|||
_sri | PerlJam: supporting Comet and WebSockets properly is really hard, our whole stack is non-blocking/evented | 16:32 | |
PerlJam | _sri: gotcha. (now that I've read a little more :) | ||
16:33
envi_laptop joined
|
|||
felher | nom: my @array = 1,2,3; @array = @array | 16:38 | |
problem known? | |||
p6eval | nom ff78b5: OUTPUT«maximum recursion depth exceeded in method infinite at src/gen/CORE.setting:4012 in method infinite at src/gen/CORE.setting:3710 in method infinite at src/gen/CORE.setting:4022 in method infinite at src/gen/CORE.setting:3710 in method infinite at src/gen/COR… | ||
16:40
alester left
|
|||
[Coke] | felher: "doctor, it hurts when I do this!" | 16:41 | |
but yah, that's a bug. | |||
felher | [Coke]: Sorry, i'm not sure i understand what you wanted to say with "doc..." :) | 16:44 | |
16:46
daniel-s joined
|
|||
moritz submits rakudobug | 16:49 | ||
[Coke] | felher: man goes to the doctor, having hurt his arm in an accident. He shows the doctor, moving his arm, saying "doctor, it hurts when I do this!" the doctor says, "well, don't do that! next!" | 16:51 | |
felher | [Coke]: Ah, i see. Thnx for explaining :) | 16:52 | |
[Coke] overtells it. I think the original is just: | 16:53 | ||
The patient says, "Doctor, it hurts when I do this." "Then don't do that!" | |||
(henny youngman) | |||
huf | it's explained/documented in the jargon file :D | 16:54 | |
[Coke] finds a list of henny youngman jokes on the internet and is distracted. | 16:55 | ||
16:55
dakkar left
|
|||
[Coke] | A man goes to a psychiatrist. "Nobody listens to me!" The doctor says, "Next!" | 16:56 | |
huf | "doctor, it hurts when i pee" "sir, there's a knot on your wiener" "oh damn, i forgot the bread!" | 16:57 | |
benabik | Bread? | ||
huf | tying knots on your hankie is a way to remember to do things | ||
according to anecdotes | |||
i'll keep telling this joke until the world learns about this custom | 16:58 | ||
:D | |||
benabik | ah | ||
moritz | problem is, it doesn't tell you *what+ you have forgotten :-) | 16:59 | |
huf | moritz: well, the guy in the joke figured it out eventually :D | ||
jokes translate rather badly between even slightly different cultures :( | 17:00 | ||
sjohnson | does Perl6 do a lot of the fancy IPC stuff? | 17:01 | |
flussence | I think the fanciest stuff we have is qx()... | 17:02 | |
17:03
donri left,
nebuchadnezzar left
|
|||
moritz | jnthn: regarding the optimizer, a shorthand for nqp::want(nqp::p6box_i(some_expression_returning_int), 'Ii', same_expression_returning_int) would really be nice | 17:10 | |
same for the Num/num case | |||
masak | huf: similarly, it's more effective to remember how many pieces of luggage you're carrying on your travels, rather than which ones. | ||
TimToady | With respect to genericity/specificity, most programmers have been taught either to be noun-dominant (OO) or verb-dominant (FP), but Perl 6 tries to keep both of those in different parts of its brain, just like you do. | 17:11 | |
huf | masak: i was told that's how to remember your shopping list | 17:12 | |
jnthn | moritz: Yeah, I did what I could with the things I had to hand. I don't find it ideal, I just don't know exactly what better looks like yet. :) | ||
masak | huf: yeah. I do that too. sometimes I make mnemonics out of the shopping items, though. | ||
TimToady | Much of the pushback on the design of Perl 6 has come from people who don't want to rethink their verbs vs nouns. | ||
see undef vs undef, for instance | |||
huf | masak: i tend to list in a sea of fog, as far as memory is concerned | ||
TimToady | of wantarray (verb) vs Parcel (noun) | ||
*or | 17:13 | ||
moritz | jnthn: nqp::p6autobox_i(expression_returning_int) maybe? | ||
17:13
MayDaniel left
|
|||
TimToady | or == as defined by nouns rather than by the language :) | 17:13 | |
masak | im2ee: thanks for starting the nice discussion on web frameworks. :) | ||
jnthn | moritz: Yeah, I was trying to find a way that fits in with what map_node already does | ||
moritz: But maybe that's a less important goal. | |||
masak | huf: huh! my mental space isn't foggy, it's a whiteboard. which is funny, since I prefer blackboards in meatspace. :) | 17:14 | |
moritz | jnthn: it could compilre rather directly to what we have now | ||
jnthn | moritz: Yes, I could make it do so :) | ||
masak | huf: but I usually make lists on my fingers, right hand first. | ||
huf | masak: in kindergarten, i was convinced (for years) that each day was two because we had an afternoon nap in the middle | 17:15 | |
not much has changed as far as my brain is concerned | |||
moritz | jnthn: on a related matter, how much sense does it make to add native ops that return Bool? | ||
jnthn: ie infix:<==> and the like | |||
huf | masak: if it's not in my irclogs, it's mythical :D | ||
diakopter backlogs to see why masak is @ | |||
pmichaud | good afternoon, #perl6 | ||
flussence | it's a halo | ||
PerlJam | diakopter: he was feeling very #perl-like earlier | ||
jnthn | pmichaud! \o/ | ||
17:16
am0c joined
|
|||
moritz | good pm, pm | 17:16 | |
17:17
Chillance joined
|
|||
masak | pmichaud! \o/ | 17:17 | |
diakopter: I lost my temper, so they gave me op. | 17:18 | ||
17:18
bluescreen10 left,
bluescreen10 joined
|
|||
[Coke] | ho, pmichaud++ | 17:19 | |
pmichaud | nom: my &foo = /bcd/; say 'abcdefg' ~~ /<&foo>/; | ||
p6eval | nom ff78b5: OUTPUT«=> <bcd>» | ||
moritz | nom: say so 'ab' ~~ /^.*b/ | 17:20 | |
p6eval | nom ff78b5: OUTPUT«Bool::True» | ||
moritz | nom: say so 'ab' ~~ /^(.*)b/ | ||
p6eval | nom ff78b5: OUTPUT«Bool::False» | ||
moritz | that one | ||
17:22
rml left
17:24
rml joined
|
|||
diakopter | wow, several people got very huffy/defensive | 17:25 | |
17:25
dark_x joined
|
|||
masak | diakopter: "defensive" is the word you generally use when these discussions happen. it's not a word I would use. what do you mean by it? | 17:27 | |
im2ee | masak, all my pleasure. :) | 17:29 | |
afk | |||
moritz | #phasers time | 17:30 | |
TimToady | diakopter: I saw little huffy/defensive, but a great deal of frustration with the inability to communicate effectively | ||
PerlJam | Yeah, more "annoyed" and "exasperated" and "irked" | 17:31 | |
GlitchMr | nom: print | ||
0xB2 | |||
p6eval | nom ff78b5: ( no output ) | ||
GlitchMr | nom: print 0xB2 | ||
p6eval | nom ff78b5: OUTPUT«===SORRY!===Confused at line 1, near "print 0\ufffd"» | ||
GlitchMr | Accidental line break character | ||
\uf | 17:32 | ||
\uffd | |||
Yeah, it makes sense | |||
I have wrongly configured IRC client | |||
nom: print 0xB2 | |||
p6eval | nom ff78b5: OUTPUT«===SORRY!===Confused at line 1, near "print 0\ufffd"» | ||
17:33
GlitchMr left
|
|||
diakopter | TimToady: ok | 17:33 | |
TimToady | myself, the discussion both here and and on #parrot led me to muse about nouns and verbs, and how hardwired they get in our brains. :) | 17:35 | |
masak | ooh, there was a discussion on #parrot? | ||
pmichaud | ...I missed a discussion? There was one that I didn't instigate/throw gasoline upon? ;-) | 17:36 | |
TimToady | about the meaning of == | ||
it was just a small conflagration :) | |||
masak | :P | ||
diakopter | masak: I guess I meant that I saw people taking [their understandings of] Woodi's questions/statements personally, as if they thought Woodi was trying to make assertions/claims that he doesn't deserve to make.. so I interpreted folks' responses as trying to defend their views that Woodi has no right to make such assertions/claims | ||
17:36
bluescreen10 left
|
|||
masak | diakopter: ooh, that *is* a good use of the word. | 17:37 | |
diakopter: as for me, you're right in the sense that I let it get to me. | |||
TimToady | otoh, observing that the path to understanding proceed through the step of understanding that you don't understand is not entirely a defensive notion :) | 17:38 | |
*ceeds | |||
masak | diakopter: but it wasn't so much "doesn't deserve to make" as "ok, how do I get this guy's attention?" | ||
PerlJam | masak: and then you turned into mst for a brief moment :) | 17:39 | |
masak | next time, if there's a next time, I won't call the person a moron, but the act. | ||
having read mst's post more closely, that seems to be what he does. | |||
which makes a lot of sense. | |||
17:39
ashleydev joined
17:40
nebuchadnezzar joined
|
|||
masak | PerlJam: well it was half experiment and half venting of frustration. | 17:40 | |
PerlJam | yes, and ad hominem statements tend to escalate any ... misunderstandings rather than quell the situation. | ||
masak | nod. | ||
17:40
bluescreen10 joined
|
|||
masak | to Woodi++'s credit, he took it well (partly because he was away making tea). | 17:40 | |
TimToady | it did appear that the person in question does (did?) not yet understand the extent to which he does not understand... | 17:41 | |
but we all have areas where we're like that... | 17:42 | ||
masak | TimToady: not sure I understand... :) | 17:43 | |
diakopter | masak: did you say something? | ||
masak .oO( Meta-Dunning-Kruger ) | |||
17:49
MayDaniel joined
|
|||
masak | though Dunning-Kruger is pretty meta already. | 17:49 | |
dalek | kudo/optimizer: ad8f64a | moritz++ | src/core/Int.pm: more native int ops |
||
masak | at least as far as I understand it :) | ||
17:56
bluescreen10 left
17:59
daniel-s left
18:05
MayDaniel left
|
|||
Woodi | i think i was scared about USABILITY eg. forcing ppls to choose what undefined type they should return; but probably others answered to perl5-undef-implementation versus perl6-undefs-idea-refactoring... i must agree i should not be allowed to talk about second... | 18:06 | |
but about versus vs nount - perl5 undef is (probably) both... | 18:07 | ||
TimToady | we might not have chosen to detangle the verb from the noun, except that Perl 6 has to be much pickier about whether the next thing is a term or not, and we aren't allowed to guess about that, as Perl 5 does | 18:10 | |
18:11
bluescreen10 joined
|
|||
TimToady | in order to be extensible, Perl 6 relies much more heavily on catching two-terms-in-a-row errors | 18:12 | |
and ambiguous verbs/nouns tend to defeat that | |||
taking that together with the fact that there are many different ways of being undefined, there really wasn't much point in keeping undef | 18:14 | ||
as for the panic, we've had a saying from the start of Perl 6, which is that "Everyone is allowed to panic, once." | 18:15 | ||
:) | |||
interestingly, masak++ is one of the chief violators of that rule, but we keep him around anyway for the entertainment value. :) | 18:16 | ||
masak | I was wondering about my panic count at this point. | 18:17 | |
tadzik | he still has something twisted before on his head | ||
Woodi | TimToady: but i still have problem with 'return;' returning something undefined. what if before that $_ have some defined value ? | 18:18 | |
TimToady | return as nothing to do with $_ in either Perl 5 or Perl 6, so I don't understand your question. | ||
s/as/has/ | 18:19 | ||
Woodi | 'return undef' was 'scripting language trick' | ||
i assume: if no walue then $_ is used. maybe i am wrong | |||
PerlJam | Woodi: you are (wrong). | 18:20 | |
TimToady | you've made a false generalization about Perl 5 | ||
only certain functions default to $_ | |||
return is not one of them | |||
Woodi | ok | ||
TimToady | we decided that having to memorize a list was bad | ||
so in Perl 6, *no* functions default to $_ | |||
you can use an invocant-less method if you like, though | 18:21 | ||
Woodi | then how [$@%]_ work ? | ||
masak | nom: sub defsay(*@a) { if @a { say @a } else { say $_ } }; $_ = 42; defsay | ||
p6eval | nom ff78b5: OUTPUT«Any()» | ||
tadzik | zing! | ||
masak | hm... $_ not dynamic... | ||
PerlJam | Woodi: what do you mean? | 18:22 | |
18:23
replore left
|
|||
TimToady | there are still some special syntactic constructs that default to $_ | 18:23 | |
such as, .foo means $_.foo | |||
and 'when' implicitly smartmatches against $_ | |||
and s/// still works on $_ by default | |||
but mostly, those variables are considered special self-declaring parameters now | 18:24 | ||
masak | rakudo: $_ = 42; .++; .say | ||
p6eval | rakudo ff78b5: OUTPUT«===SORRY!===Method 'unshift' not found for invocant of class 'Undef'» | ||
masak | hah! | ||
masak submits rakudobug | |||
b: $_ = 42; .++; .say | |||
Woodi | ok | ||
p6eval | b 1b7dd1: OUTPUT«===SORRY!===Method 'unshift' not found for invocant of class 'Undef'» | ||
jnthn | masak: already ticketed, I think :) | ||
masak | curses! I probably beat myself to it! | 18:25 | |
TimToady | I think I asked about .++ last week, in fact | ||
masak | oh yeah | ||
18:25
kaare_ joined
|
|||
TimToady | Woodi: so constructs that hardwire $_ in Perl 5 don't necessarily have to do that in Perl 6; for instance, when you say grep { $_ eq 'foo' } | 18:26 | |
in Perl 5, it's a special syntax that finds a block and forces $_ to be a kind of loop parameter | |||
in Perl 6, it's just an anonymous function that is the first argument to grep | 18:27 | ||
and when you write { $_ eq 'foo' } it's as if you'd said sub ($_) { $_ eq 'foo' } | |||
Woodi | so $_ is now near plain variable... | 18:28 | |
PerlJam | Woodi: same with @_ and %_ | ||
Woodi | ok, memoized i think | 18:29 | |
PerlJam | Woodi: Perl 6 is simultaneously less magical and more magical than Perl 5. :) | 18:30 | |
18:30
envi_laptop left
|
|||
Woodi | PerlJam: oh yes, sometimes i think Perl6 is to compressed by Huffman method :) | 18:31 | |
TimToady | that is one design principle out of many, but we do use it from time to time | 18:32 | |
masak | any program or language can be ruined by taking a good thing to extremes. | ||
PerlJam | masak: look at lisp! :) | ||
dalek | kudo/optimizer: b6c5071 | moritz++ | src/core/Num.pm: native num trig ops |
||
kudo/optimizer: e19f726 | moritz++ | src/core/Num.pm: more num builtins, including log() and the rest of the trig functions |
|||
masak | PerlJam: hey, careful. do not upset the big-bearded ancestors! | 18:33 | |
Woodi | TimToady: i worry that so many new features can scary a lot of users... but if someone dig that he/she drown :) | 18:34 | |
PerlJam | Woodi: Similar to how you can program in Perl using metaphorical baby-talk, you can pick up the "new features" piece-meal so that they aren't so onerus. | 18:36 | |
TimToady | keeping new users from drowning in too much detail is also one of our design principles | ||
but it's all tradeoffs | 18:37 | ||
there's no such thing as a perfect language | |||
masak | awww | ||
TimToady | and that's the fault of the waterbed theory, which is another design principle | ||
PerlJam | TimToady: context is king! Perfect for what purpose? :) | ||
TimToady | the waterbed theory is actually implicit in huffman coding, since you can only make some things easier by making other things harder | 18:38 | |
Woodi | PerlJam: in Perl context the usual context is UNIX admins scripting (<6)... | 18:39 | |
tadzik | I won't be so sure | ||
TimToady | another design principle in Perl 6 is that there are always *many* contexts, often with conflicting goals | ||
PerlJam | Woodi: maybe. There are lots of perl-based web apps out there. | 18:40 | |
Woodi: And I primarily use perl at work for data processing and number crunching stuff (with PDL) | |||
masak | Woodi: at $dayjob, it's web apps all the way. not so much UNIX admins as everything admins. :) | 18:41 | |
TimToady | even for a single piece of software, the users, designers, programmers, marketers, and administrators can have profoundly conflicting goals. | ||
Woodi | TimToady: i have one dream... High Performance Perl... | 18:42 | |
TimToady | Perl 6 is much likelier to get there than Perl 5 ever could be | 18:43 | |
flussence | .oO( never had speed issues running frozen-bubble on my pentium 2... ) |
||
TimToady | but high performance depends on good optimizers, and good optimizers depend on knowing a lot about your program | 18:44 | |
masak | you make it sound so easy ;) | ||
flussence | but if someone implements perl6 on top of LLVM or the like, then it becomes Someone Else's Problem :) | ||
TimToady | so an optimizable language makes many distinctions, which worries Certain People | 18:45 | |
flussence: as we have seen already, if the VM in question doesn't know what to do with the distinctions provided by the language, not much optimization can happen ;) | 18:47 | ||
18:47
bluescreen10 left
|
|||
masak | that's the challenge of optimization: it cuts through all layers of the stack. | 18:48 | |
a few other things do that too. DESTROY submethods among them. we don't have those either. | |||
PerlJam | It would be interesting if Perl could do some type-inference and tell you when you've used an object in a slot with an incompatible type | ||
jnthn | Well, I see it more as being able to pass sufficient information down the stack. | ||
TimToady | and why the impedance mismatch with the parrot model was such a killer | ||
jnthn | PerlJam: It's on my todo list for optimizer. | ||
TimToady | anyway, all that <waves hands upward> is another design principle | 18:50 | |
we've got 'em coming and going | |||
18:50
birdwindupbird joined
|
|||
Woodi | i would like that one day marketing ppls will go down to admins and say: we want you use Perl in next app becouse we do not want spend money on new servers but we want new projects perform better on old servers :) | 18:50 | |
18:50
birdwindupbird left
|
|||
PerlJam | Woodi: I don't think that marketing people care about new servers or not :) | 18:52 | |
Woodi | PerlJam: they do... it is pain for them - how to buy as small amount as possible :) | 18:53 | |
18:55
skangas left
18:58
GlitchMr joined
|
|||
Woodi | ah, right, management ppls | 18:58 | |
19:00
bluescreen10 joined
|
|||
im2ee | re | 19:00 | |
moritz | jnthn: fwiw, nom merged into optimizer runs mandelbrot-color in 37.8s | ||
jnthn | ooh, we broke 40s \o/ | ||
moritz: Is that unmodified mandelbrot-color? | 19:01 | ||
moritz | jnthn: yes | ||
jnthn | moritz: e.g. no extra type info added? | ||
moritz: OK :) | |||
nom: say (16 * 60 + 14) / 37.8 | |||
p6eval | nom ff78b5: OUTPUT«25.7671957671958» | ||
jnthn | Something of a speedup. Still plenty of work to go :) | 19:02 | |
moritz | 27.6s with additional type info | ||
jnthn | Wow. :) | ||
Living the gradual typing dream :) | 19:03 | ||
...well, not quite yet. :) | |||
Woodi | so if i talk so much today then two more sentence do not change to much i think :) so: Simple::Redis can store now keys, hashes and list; to be found in: github.com/slunski/perl6-simple-redis | ||
moritz | nom: sub f(int $x) { $x = $x + 1}; my int $x = 10; f($x); say $x | ||
p6eval | nom ff78b5: OUTPUT«10» | ||
Woodi | gratulation Perl6 magicans :) | 19:04 | |
moritz | jnthn: there's probably no good way to make ++ work on native ints, is there? | ||
Woodi | and gn and gl #perl6 | ||
jnthn | moritz: I suspect we have to make native int rw params work somehow. | ||
moritz: It's non-trivial and I need to fathom how to do it in a way that optimizes down nicely. | 19:05 | ||
moritz: So, ENOTYET. | |||
But I really don't think telling people they can't ++ an int is going to fly. | |||
moritz | jnthn: any objections to me pushing the merging of nom into optimizer? | ||
jnthn | moritz: Go ahead. | 19:06 | |
TimToady | C can ++ an int, so can we...someday... | ||
moritz | well, it could be macro-ish | 19:07 | |
dalek | kudo/optimizer: 2146e92 | moritz++ | / (14 files): Merge branch 'nom' into optimizer |
||
jnthn | Well, inlining practically is about turning a sub into a macro :) | 19:09 | |
TimToady | it does imply understanding the nativeness of references though | ||
jnthn | TimToady: yes, that's what makes it a bit tricky :) | ||
TimToady | and how type information on a native variable is carried by its context | 19:10 | |
not by the variable itself | |||
moritz | jnthn: fwiw gist.github.com/1265348 doesn't seem to inline the call to &fancy, even though there's log(num) multi now | ||
jnthn | Well, that's what makes me not so scared of native references. | ||
moritz | jnthn: not sure if that's expected or not | ||
jnthn | moritz: It won't inline things with sub calls in just yet. | 19:11 | |
moritz: That needs some special care. | |||
The optimizer todo list is....long :) | |||
moritz | and even weireder, the call is | 19:12 | |
$N100 = "&fancy"($P103) | |||
I would have expected it pass a num register to &fancy | |||
jnthn | Should be possible too. | ||
diakopter | TimToady: since I've moved to California, I've notied people have stopped using linking verbs, definite article, and sentence subjects, and not just in IRC/IM/emails, speech also. Is this a California/SiValley thing or global or what? | ||
moritz expects full awesomeness :-) | |||
jnthn | moritz: That's where I'm aiming :) | 19:13 | |
Rome wasn't built in a day :) | |||
diakopter | or 11 years | 19:14 | |
jnthn | :P | ||
ooh, it's stopped raining...I should visit the store and get something to eat for supper | |||
moritz | rome wasn't built in software either :-) | ||
jnthn | bbs | ||
diakopter | TimToady: is it just that any word that could possibly be left out unambiguously is left out, regardless of convention? | 19:16 | |
TimToady | I would have to see some examples in situ, but I would hazard a guess that in such cases redundancy is provided out-of-band, or by protocol | 19:18 | |
you can't have effective human communication without some redundancy or error correction mechanism | 19:19 | ||
so arguably, what we could be seeing is people not caring whether they communicate effectively :) | |||
you could also be seeing spillover from people's native tongues | 19:20 | ||
not many languages have definite articles, for instance | |||
diakopter | from $work irc: bruce: non symlink versioning live in production! # implied "is now" | ||
benabik | … symlink based versioning? | 19:21 | |
TimToady | many languages omit "is" where it's obvious, such as classical greek | ||
but I'd also argue that the ! has some aspectual, er, aspect to it | 19:22 | ||
something like "anything surprising is by definition new information" | |||
so that takes care of the "now" | |||
diakopter | PersonA: Existing project works for me. # implied "An" | 19:23 | |
TimToady | indefinite articles are even rarer in human languages | ||
diakopter | PersonB: ok works on whatever server i'm on # implied "it" | 19:24 | |
it might be my company culture (to which I'm just not as accustomed as I might be) :/ | |||
TimToady | there's a long tradition, largely unrecognized by grammar nazis, of leaving the subject out in English when it's obvious | 19:25 | |
"gotta run" | |||
"sure is dark in here!" | |||
"don't get no satisfaction" | 19:26 | ||
colomon | TimToady: Don't know what you are talking about | ||
masak | diakopter: I find those utterances terse but not surprisingly so. | ||
colomon | ;) | ||
TimToady | "works for me" | 19:27 | |
diakopter | have to lunch & ;) | ||
19:28
mberends left
|
|||
masak | articles are nice to have in a language but are by no means necessary. | 19:28 | |
their use is much more complicated than first meets the eye. | |||
TimToady | s/ a / | 19:29 | |
not to mention / | |||
masak | :) | 19:31 | |
19:31
MayDaniel joined
|
|||
TimToady | diakopter: note also the 1st/2nd person vs 3rd person distinction is partially carried by whether the verb has an 's' on it | 19:36 | |
"works for me" vs "work for me" | 19:37 | ||
19:37
bluescreen100 joined
|
|||
TimToady | the latter can be either 1st or 2nd person depending on the question it's answering | 19:37 | |
"What do you do for a living?" "Work for me." | 19:38 | ||
"What do you want me to do?" "Work for me." | |||
19:38
MayDaniel left
|
|||
TimToady | when you say "work for me" to mean "work for myself" is also a fascinating linguistic topic. | 19:39 | |
why is it "I've gotta be me!" and not "I've gotta be myself!" ? | 19:40 | ||
diakopter | or "I've gotta be I" | ||
TimToady | fake latin doesn't impress me :) | 19:41 | |
diakopter | I thought I was going to lunch | ||
jnthn | Curious. "Work for me" sounds really odd to my ears; I'd expect it to be "Work for myself" | ||
TimToady | didn't say you had to go | ||
it's a mechanism for treating yourself as some other person, pragmatically speaking | 19:42 | ||
linguistic multiple personalities | 19:43 | ||
not just "me" | 19:44 | ||
"Just look at you!" | |||
why isn't it "youreself"? | |||
s/e// | |||
moritz | in German we're much more picky about such reflexive forms | ||
TimToady | s/ about.*// :) | ||
moritz | :-) | ||
though some of us are abolishing the Genetive, which is a realy pity | 19:45 | ||
TimToady | well, English is slowly losing the subjunctive, and "whom" | 19:46 | |
masak | genitive* | 19:47 | |
TimToady | the past is unevenly distributed too | ||
masak | from 'gignere', 'to beget'. | ||
heh, sometimes Latin looks like ancient Italian :P | 19:48 | ||
[Coke] wishes his phone would stop reminding him about the sixperl call. | 19:52 | ||
masak | those still happen? | 19:53 | |
19:54
MayDaniel joined
|
|||
TimToady | I would not infer that, were I you. | 19:56 | |
masak | I see. | 19:57 | |
I now feel fairly confident in inferring that TimToady no longer participates in sixperl calls :P | 19:58 | ||
PerlJam | They could spontaneously start again ... :) | 19:59 | |
moritz calls "sixperl" | |||
diakopter | #phasers is more fun | ||
moritz | there you go, spontanesous sixperl call | ||
masak groans | |||
nom: say "spontaneous ", <one two three four five six>.roll, "perl call" | 20:00 | ||
p6eval | nom ff78b5: OUTPUT«spontaneous fourperl call» | ||
TimToady | Refrigerator! | ||
[Coke] | eek. | 20:01 | |
m6locks | nice | ||
[Coke] | bananaphone call. | ||
masak | maybe I should've {}'d inward, rather than "-ing outward. | ||
nom: say "ba", "na" x 2, "phone call" | 20:02 | ||
p6eval | nom ff78b5: OUTPUT«bananaphone call» | ||
masak | nom: say "ba{"na" x 2}phone call" | 20:03 | |
p6eval | nom ff78b5: OUTPUT«bananaphone call» | ||
masak finally embraces {} in qq strings as something he likes :) | |||
TimToady++ | |||
sjohnson | nom: say ("ring" X 7).join("-"), "... banana phone!" | 20:04 | |
p6eval | nom ff78b5: OUTPUT«ring-7... banana phone!» | ||
sjohnson | nom: say ("ring" x 7).join("-"), "... banana phone!" | ||
p6eval | nom ff78b5: OUTPUT«ringringringringringringring... banana phone!» | ||
masak | sjohnson: 'x' is string rep, 'xx' is list rep. | ||
sjohnson | nom: say ("ring" xx 7).join("-"), "... banana phone!" | ||
p6eval | nom ff78b5: OUTPUT«ring-ring-ring-ring-ring-ring-ring... banana phone!» | ||
sjohnson | masak++ | ||
benabik | nom: say "{join ('ring' xx 7): '-'}… ba{'na' x2}phone!" | 20:05 | |
p6eval | nom ff78b5: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 1» | ||
benabik | nom: say "{('ring' xx 7).join('-')}… ba{'na' x2}phone!" | 20:06 | |
p6eval | nom ff78b5: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 1» | ||
benabik | Ah well. | ||
masak | benabik: 'x 2', not 'x2' | ||
STD has a better error message. | |||
benabik | nom: say "{join ('ring' xx 7): '-'}… ba{'na' x 2}phone!" | ||
p6eval | nom ff78b5: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 1» | ||
masak | aww :/ | ||
benabik | std: say "{join ('ring' xx 7): '-'}… ba{'na' x 2}phone!" | 20:07 | |
p6eval | std 20ae3bd: OUTPUT«ok 00:01 123m» | ||
tadzik | hehe | ||
masak | I'm not sure Rakudo supports indirect methods. | ||
tadzik | way better | ||
sjohnson | ( `ー´) | ||
benabik | nom: say "{('ring' xx 7).join('-')}… ba{'na' x 2}phone!" | ||
p6eval | nom ff78b5: OUTPUT«ring-ring-ring-ring-ring-ring-ring… bananaphone!» | ||
masak | \o/ | ||
benabik | masak++ | ||
masak | b: say "{join ('ring' xx 7): '-'}… ba{'na' x 2}phone!" | ||
p6eval | b 1b7dd1: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
20:07
kmwallio left
|
|||
masak | b didn't either. | 20:07 | |
moritz | nom and b mostly parse the same | 20:08 | |
masak | niecza: say join ('ring' xx 7): '-' | ||
p6eval | niecza v10-38-g23f1b2e: OUTPUT«===SORRY!===Invocant handling is NYI at /tmp/PTv0Ncv1UF line 1 (EOF):------> say join ('ring' xx 7): '-'⏏<EOL>Unhandled Exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ … | ||
masak | awww. | ||
moritz | niecza++ | ||
masak | but... who will implement it FIRST? :D | ||
tadzik | YAPSI! | ||
20:08
y3llow left
|
|||
masak | well, Yapsi doesn't to methods yet... | 20:08 | |
20:09
pothos left
|
|||
tadzik | nom: my @a = "hip" xx 2; say ~(@a, @a.WHAT.perl), "!" | 20:09 | |
masak | nor classes and objects in general... | ||
p6eval | nom ff78b5: OUTPUT«hip hip Array!» | ||
masak | lol | ||
I had forgotten about that one ;) | |||
tadzik | you forget about it the second time, and for the second time I'm here to remind you that it's your invention :P | 20:10 | |
diakopter | niecza: say: say 4; goto say; # TimToady why isn't say allowed as a label | ||
20:10
y3llow joined
|
|||
p6eval | niecza v10-38-g23f1b2e: OUTPUT«===SORRY!===Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/G9CQevIUQU line 1:------> say: say⏏ 4; goto say; # TimToady why isn't say aTwo t… | 20:10 | |
masak | tadzik: well, this time I (vaguely) remembered that I had originated it :) | ||
20:10
pothos_ joined
|
|||
tadzik | ;) | 20:10 | |
20:11
pothos_ is now known as pothos,
mj41 joined
20:12
y3llow left,
packetknife left
|
|||
dalek | kudo/optimizer: 5b40d01 | moritz++ | src/core/ (4 files): use native types in the setting a bit more |
20:13 | |
20:13
y3llow joined,
GlitchMr left,
pothos left,
pothos_ joined
20:14
pothos_ is now known as pothos
|
|||
flussence | nom: say ('ring' X '-' xx 6, '… bananaphone!').join | 20:14 | |
p6eval | nom ff78b5: OUTPUT«ring-ring-ring-ring-ring-ring-ring… bananaphone!» | ||
20:14
wamba left
20:15
y3llow left,
y3llow joined
|
|||
masak | nom: given {}.^name -> $_ is copy { .=uc; .=subst('H', 'M'); $_ = .comb.join(' * '); .say } | 20:16 | |
p6eval | nom ff78b5: OUTPUT«M * A * S * H» | ||
flussence | nom: print 'ring' X '-' xx 6, '… bananaphone!' # shorter | 20:17 | |
masak | tadzik: new one ;) | ||
p6eval | nom ff78b5: OUTPUT«ring-ring-ring-ring-ring-ring-ring… bananaphone!» | ||
tadzik | masak: haha, nice :) | ||
masak | TimToady: sometimes I'm wondering if .=rhs shouldn't be a macro instead, expanding to $_.=rhs, with rhs possibly being several chained method calls; see above. | ||
20:18
mattp_ left
|
|||
flussence | I want a call-a-bunch-of-methods shorthand like ». is for variables... | 20:18 | |
tadzik | given? | 20:19 | |
I don't think I understand | |||
oh, i think I understand | |||
flussence | you can write ($a, $b, $c)».foo, but not $a.«(<foo bar etc>) | 20:20 | |
20:20
mattp_ joined
|
|||
masak | flussence: a bit worrying that in your proposed syntax, the method names are strings... | 20:20 | |
flussence | yeah, not sure about the details. | ||
masak | std: my $a; $a.«(<foo bar etc>) | 20:21 | |
p6eval | std 20ae3bd: OUTPUT«===SORRY!===Unable to parse quote-words subscript; couldn't find right double-angle quote at /tmp/v4Lx0OvsVs line 1 (EOF):------> my $a; $a.«(<foo bar etc>)⏏<EOL>Parse failedFAILED 00:01 120m» | ||
masak | std: my $a; $a«.(<foo bar etc>) | ||
p6eval | std 20ae3bd: OUTPUT«===SORRY!===Unable to parse quote-words subscript; couldn't find right double-angle quote at /tmp/3WegW9TvCg line 1 (EOF):------> my $a; $a«.(<foo bar etc>)⏏<EOL>Parse failedFAILED 00:01 120m» | ||
sorear | good * #perl6 | ||
phenny | sorear: 13:13Z <[Coke]> tell sorear that when I fudge roast for niecza, he should definitely check to make sure he's happy with the new tests. | ||
flussence | and both of them look like the start of a hash subscript... | 20:22 | |
masak | hola, sorear | ||
sjohnson | nom: "efbc88e38080efbd80e383bcc2b4efbc890a".pack("H*").print | 20:25 | |
p6eval | nom ff78b5: OUTPUT«Method 'pack' not found for invocant of class 'Str' in block <anon> at /tmp/cL0ao0RmEu:1 in <anon> at /tmp/cL0ao0RmEu:1» | ||
masak | I'll get to it, I promise :) | 20:26 | |
but even then, you'd have problems with the Str/Buf distinction above. | |||
I can never quite remember which way without looking... | 20:27 | ||
flussence | nom: my $a = 1; {.sin, .cos, .tan}».map({$a.$_}) | ||
p6eval | nom ff78b5: ( no output ) | ||
flussence | oh wait | ||
nom: my $a = 1; say {.sin, .cos, .tan}».map({$a.$_}) | |||
p6eval | nom ff78b5: OUTPUT«0.841470984807897 0.54030230586814 1.5574077246549» | ||
sorear | backlog complete | ||
masak: you can take your hat off now. | |||
flussence | it's close, but backwards and messy | ||
sjohnson | what's the pack equivalent in perl 6? | 20:28 | |
sorear | diakopter: in 'say: say 5', say IS allowed as a label, but it effectively shadows CORE::say | ||
niecza: say: &say(4); goto say; # using &say explicitly disambiguates | 20:29 | ||
p6eval | niecza v10-38-g23f1b2e: OUTPUT«===SORRY!===Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/wFcMxL_aNS line 1:------> say: &say(4); goto say⏏; # using &say explicitly disambiguat… | ||
flussence | std: goto 'say' | ||
p6eval | std 20ae3bd: OUTPUT«ok 00:01 120m» | ||
sorear | niecza: say: &say(4); goto 'say'; # using &say explicitly disambiguates | ||
tadzik | sjohnson: it's "pack", but NYI in nom | ||
p6eval | niecza v10-38-g23f1b2e: OUTPUT«(timeout)4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444xE2x90 | ||
sjohnson | o | ||
tadzik | b: "efbc88e38080efbd80e383bcc2b4efbc890a".pack("H*").print | ||
p6eval | b 1b7dd1: OUTPUT«Method 'pack' not found for invocant of class 'Str' in main program body at line 22:/tmp/bIFCI1d64Y» | ||
masak | sorear: seems I'm not authorized to take my hat off. moritz op'd me. | ||
tadzik | eek | 20:30 | |
sorear | niecza: say: CORE::say 4; goto 'say'; # this works too diakopter | ||
flussence | std: 10: print "HELLO WORLD\n"; 20: goto 10 | ||
sorear | masak: /mode #perl6 -o masak ? | ||
p6eval | niecza v10-38-g23f1b2e: OUTPUT«(timeout)4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444xE2x90 | ||
std 20ae3bd: OUTPUT«===SORRY!===Illegal use of colon as invocant marker at /tmp/ZVkIMA2_Lw line 1:------> 10:⏏ print "HELLO WORLD\n"; 20: goto 10Check failedFAILED 00:01 122m» | |||
20:30
MayDaniel left,
masak sets mode: -o masak
|
|||
tadzik | :) | 20:30 | |
masak | ooh :) | ||
PerlJam | flussence: remember, all's fair if you predeclare. you didn't first load BASIC::Grammar :) | ||
masak | sorear++ | 20:31 | |
20:31
phenny left,
mj41 left
|
|||
sorear | masak: what were you trying? | 20:31 | |
masak: btw, I just gave you a chanserv can-use-the-op-command bit | 20:32 | ||
masak | thanks. | ||
I was trying /msg Chanserv deop #perl6 masak | |||
moritz | /msg chanserv op #perl6 | ||
is the magical incantation then | |||
and you can deop yourself | |||
masak | not with ChanServ I couldn't... | ||
moritz | well, with 'yourself' I meant /deop masak :-) | 20:33 | |
masak | ok :) | ||
sorear | pm, moritz, and I are the metaops here. | 20:34 | |
sjohnson | rakudo: "efbc88e38080efbd80e383bcc2b4efbc89".pack("H*").print | ||
p6eval | rakudo ff78b5: OUTPUT«Method 'pack' not found for invocant of class 'Str' in block <anon> at /tmp/nPy85Y4V11:1 in <anon> at /tmp/nPy85Y4V11:1» | ||
sjohnson | i guess since nom won't do it, i shouldn't have bothered with that. oops! | 20:35 | |
masak | sjohnson: .pack would be a method on List/Parcel, but I guess there could be a delegator on Cool as well. | ||
tadzik | time for fat-face-with-open-eyes! :) | ||
20:35
wolfman2000 left
|
|||
sjohnson | ( ° ー°) | 20:35 | |
tadzik | :D | ||
I have to copypaste those somewhere | 20:36 | ||
sjohnson | The fatface monologues | ||
masak | lol | ||
flussence | this talk of .pack reminded me of a thing I wanted to do but never got around to... gist.github.com/1186468 | 20:38 | |
sorear | 11:23 < masak> sorear: how far along are you with the /serialization branch? | ||
I'd say I'm around half done; probably a bit more than half when it comes to hard stuff, a bit less for yakshavy bits | 20:39 | ||
ETA 1-2 weeks, depending on tuit availability | |||
11:23 < masak> sorear: and what will it mean, exactly, when it lands? | |||
moritz | instant world domination | 20:40 | |
proper role composition | |||
masak | as if Niecza needed more of that... :P | ||
world domination, I mean. | |||
moritz | it does | ||
im2ee | Good night! :) | ||
masak | 'branoc! | 20:41 | |
sorear | the immediate effects will be slower compilation, slightly faster startup, and more availability of metastuff at runtime | ||
post-merge, I'll tackle roles and BEGIN, both of which are clearly blocking on this | |||
masak | *nod* | ||
why are roles blocking on it? | |||
sorear | because I don't want to implement role composition twice | 20:42 | |
we need the ability to compose roles at compile time and at runtime | |||
in niecza/master, those are two completely different metamodels | |||
moritz | I've just did an experiment; I tried to think of all the corner cases of the &min function, and implement it | 20:45 | |
gist.github.com/1265646 | |||
looks surprisingly lengthy/complex -- is there anything I can significantly simplify? | |||
20:45
hamza joined
|
|||
masak | # FIRST next; | 20:46 | |
nice! | |||
moritz++ # idiom discovery | 20:47 | ||
tadzik | what does it do? | ||
besides "nothing, it's commented out"? | |||
like "start from the second iteration"? | 20:48 | ||
moritz | tadzik: skip the first iteration, if not commented out | ||
right | |||
sorear | moritz: don't you also need special cases for handling Ranges? | ||
moritz | sorear: care to elaborate? | ||
sorear | I vaguely thought min was overloaded to do interval operations | 20:49 | |
20:49
phenny joined
|
|||
masak | moritz: you don't need the trinary at L15 if you just assign -Int at L5. | 20:49 | |
er, -Inf. | |||
perl6: say -Int | |||
p6eval | rakudo ff78b5: OUTPUT«Cannot unbox type object to a native integer in sub prefix:<-> at src/gen/CORE.setting:2259 in block <anon> at /tmp/trrLYZoBzd:1 in <anon> at /tmp/trrLYZoBzd:1» | ||
..pugs, niecza v10-38-g23f1b2e: OUTPUT«0» | |||
moritz | sorear: minmax does some weird Range stuff, but I'm not aware of any in min | ||
masak submits rakudobug | |||
sorear | moritz: you can combine the two clauses if you allow both a $comparer and a $transformer | ||
masak | it would be good to have it be one code path, not two similar-ish ones. | 20:51 | |
20:51
im2ee left
|
|||
moritz | sorear: you're right; separating the loops is probably premature optimization | 20:51 | |
20:51
hamza left
|
|||
sorear | moritz: if you really want to deoptimize, &cmp = { &by($^a) cmp &by($^b) } | 20:52 | |
and what's the &by.arity == 0 case good for? | 20:53 | ||
moritz | sorear: :by(&rand) | ||
sorear | there is no &rand | ||
PerlJam | moritz++ | ||
moritz | sorear: :by(-> { rand }) then | ||
sorear | ...why would you do that? | ||
moritz | sorear: people write code like that. If you don't guard against the zero-arity case, masak will write a bug report | 20:54 | |
PerlJam | heh | ||
:by( -> { -1 }) is more likely I think | |||
20:55
mj41 joined
|
|||
moritz | .[0] would be cheaper | 20:57 | |
masak | sorear: that's true, I will. | ||
sjohnson | any one here an "flock master" ? | 20:58 | |
benabik | sjohnson: I just had do deal with some problems with it, but I'm not a master exactly. | 20:59 | |
sjohnson | benabik: cool. it's about time i finally got proficient with the basics of it | 21:00 | |
PerlJam | Is a flock master the lead duck? | ||
sjohnson | heh | ||
masak | does it count if one has player some "Angry Birds"? | ||
played* | |||
sjohnson | less that, more a guy who understands flock() like the back of his hand | ||
masak: i suppose it could :) | |||
benabik | sjohnson: Ah. I now know enough to do some simple debugging involving NFS. | 21:01 | |
moritz wonders what kind of understanding the back of a hand needs | |||
PerlJam | sjohnson: I've pondered flock more than I've pondered the back of my hand I think. | ||
benabik | ( flock -s 200 || exit 1; echo locked! ) 200>mylock | ||
sjohnson | if a script locks a text file... and some other script that doesn't use any flock statements tries to modify it... will the changes be allowed? | ||
benabik | sjohnson: That's the kind of thing I don't know. :-D | 21:02 | |
sjohnson | in other words, does flock() go by the honesty policy? | ||
moritz | yes | ||
ie, yes, changes allowed | |||
PerlJam | sjohnson: yes | ||
sjohnson: unless it's on a system that requires mandatory locking | |||
er .. you know what I mean | 21:03 | ||
sjohnson | interesting. so, if say that 2nd script wanted to do the right thing, would you need some sort of explicit flock() statement that requests to use it, and thus would be rejected since the 1st script used it | ||
? | |||
PerlJam | s/requires/only supports/ # now you really know what I meant :) | ||
moritz | sjohnson: yes | ||
flussence | if you're trying to write a file safely, the safe way is to write to a temp copy, fsync then rename over the old version. Modifying in-place is bad. | 21:04 | |
masak | even utilities that modify in-place do what flussence suggested :) | ||
21:04
kaare_ left
|
|||
flussence | (a lot of people found this out the hard way when ext4 became widespread) | 21:05 | |
PerlJam | flussence: er ... why? What did ext4 have to do with it? | ||
moritz | sjohnson: fwiw you can find out about the locking stuff quite nicely by doing experiments | ||
sjohnson: in one console, write | |||
perl -Mautodie -wE 'open my $h, "README"; flock $h, 2; sleep(5000)' | |||
sjohnson | yeah, i was about to bust open my classic "farm". | ||
sjohnson% touch pig cow chicken | 21:06 | ||
flussence | PerlJam: they changed the default journal mode, so rename-then-fsync went horribly wrong or something like that | ||
moritz | and in another one, try echo 'foo' > README | ||
sjohnson | moritz: i like your idea better than mine! | ||
PerlJam | sjohnson: Is this on linux btw? | ||
sjohnson | yeah | ||
just some ubuntu shell i have | |||
flussence | (I think a workaround's been added to ext4 since then) | 21:07 | |
PerlJam | sjohnson: if you have root, you can remount a partition for mandatory locking and see what the difference is | ||
sjohnson learns much today | 21:08 | ||
PerlJam | sjohnson: some systems, (like Windows I believe) only have mandatory locking, so if you're writing for portability you should understand what happens :) | 21:09 | |
moritz | masak: why do you think that -Int should not warn? | ||
sjohnson | i suppose i might understand more with this too: en.wikipedia.org/wiki/File_locking | ||
21:09
ggoebel left
|
|||
sjohnson | PerlJam: good to know. thankfully, no portability with this particular script.. but good to keep in mind | 21:09 | |
thanks for the help | 21:10 | ||
*p6 group hug* | |||
masak | moritz: because I can see it being part of a legitimate mathematical computation, where it would make more sense for it to pun to 0 than to warn. | 21:11 | |
moritz: I think we have several of these cases. | |||
PerlJam | sjohnson: so ... when will you have flock implemented for Perl 6? :-) | ||
sjohnson | if i tried, i'm sure it would be the collapse of the internet | 21:12 | |
i have 0 faith in my low-level programming skills at this present time | |||
moritz | masak: note that ++ and -- and *= etc. don't warn | ||
sjohnson | especially if some bank used rakudo | ||
moritz | nom: +Int | ||
p6eval | nom ff78b5: OUTPUT«Use of uninitialized value in numeric context» | ||
sjohnson | might get sued millions of dollars | ||
sorear | moritz: I think it would more more correct to die(..) unless &by.arity == 1|2 | 21:13 | |
masak | moritz: oh, so maybe it's just the "mutating" math operators that don't warn? | 21:14 | |
moritz | masak: yes | ||
masak | I'll add that to the ticket (and change the subject) | ||
dalek | kudo/nom: d3e6519 | moritz++ | src/core/Int.pm: add some missing :D markers on Int ops, masak++ |
||
21:15
bluescreen100 left,
bluescreen10 left
|
|||
jnthn | moritz: That...probably just hosed inlining :( | 21:15 | |
sjohnson | how hard is it to understand parrot programming language? | ||
sorear | masak: per spec, $x op= $y means something like $x = ($x // [op]) op $y | ||
moritz | sjohnson: there is no "parrot programming language" | ||
jnthn: then inlining needs to improve wrt D | 21:16 | ||
masak | sjohnson: did you mean PIR? nqp? | ||
moritz | erm, :D | ||
masak | sjohnson: C? :) | ||
sjohnson | PIR | ||
i would imagine that rakudo is written in some sort of parrot-script, if you will | |||
moritz | jnthn: those :D's aren't in there for fun, but because we need them | ||
masak | sjohnson: no, not anymore. | 21:17 | |
sjohnson wonders where he's been all this time | |||
masak | sjohnson: Rakudo is written in Perl 6, nqp, and some C. | ||
jnthn | moritz: It's kinda trickyish. | ||
sjohnson | what's NQP? | ||
not quite perl.. hmm | |||
21:17
dual left
|
|||
moritz | a subset of Perl 6 | 21:17 | |
jnthn | moritz: We have to know try and track declaredness as well as type. | ||
sjohnson tries to understand | |||
tadzik | hehe | ||
"add some missing :D" -- moritz | |||
sjohnson | so, if you want to compile rakudo, what gets compiled first? C? | 21:18 | |
PerlJam | sjohnson: NQP is just enough Perl 6 to implement Perl 6 :) | ||
tadzik | sjohnson: yes | ||
sjohnson | trying to figure what the first stage is of perl6 being interpretted to build rakudo | ||
tadzik | then the compiler, which is nqp | ||
then the setting, which is Perl 6 | |||
sjohnson | perl6 dev team has been busy bees! | ||
moritz | jnthn: maybe we need to declare variables as Int:D more often | 21:19 | |
... or maybe that should become the default, just like in params | |||
jnthn | moritz: Yeah, we don't implement that defaulting yet. | ||
moritz: Though it shouldn't be hard to. | |||
tadzik | :D is default in params? | ||
jnthn | moritz: There's only one problem with it for variables | 21:20 | |
my Str $s; | |||
moritz | right | ||
PerlJam | tadzik: :D == defined | ||
tadzik | yes, I know | ||
sorear | :D is default in params? | ||
moritz | jnthn: that might need to assign a default | ||
PerlJam | oh. | ||
jnthn | sorear: Apparently. ;) | ||
tadzik | huh | ||
sorear | when was this decided? | ||
PerlJam is only paying about 0.25 attention to the N channels he's looking at on IRC | |||
moritz | or maybe it's only on the invocant? | ||
moritz checks the spec | |||
jnthn | oh, maybe...I thought it was done for params generally | 21:21 | |
flussence | rakudo: sub x(Str $x) { say $x.WHAT }; x(Str) | ||
p6eval | rakudo ff78b5: OUTPUT«Str()» | ||
moritz | the commit log of a4e255cdec866af833f91d1e3c0d9ce6ddbdf74f says "Invocants now default to :D" | ||
jnthn | oh | ||
Hm, ok | |||
That's less happy for the inliner :) | 21:22 | ||
moritz | huh, I thought the :D caused problem for the inliner? | ||
PerlJam | jnthn: is there some preference between :D and :U in MMD? | ||
moritz totally confused | |||
masak | sorear: I remember this being talked about during pre-YAPC::EU. | ||
jnthn | moritz: Yes and no (more) | 21:23 | |
moritz: Needing to know whether something is defined or not to inline is only a problem if the common case is that we don't easily know. | |||
moritz: If stuff defaults to :D and you have to declare otherwise, the optimizer knows plenty. | |||
If the situation is "we need to know it's :D to inline the candidate, and we have to infer that", then it's a little tricky. | 21:26 | ||
moritz | right | ||
gfldex | nom: my Str $foo = '12.345'; say $foo.Rat; | ||
p6eval | nom ff78b5: OUTPUT«Method 'Rat' not found for invocant of class 'Str' in block <anon> at /tmp/ERpEWJVnpT:1 in <anon> at /tmp/ERpEWJVnpT:1» | ||
moritz | nom: say '12.234'.Numeric.WHAT | 21:27 | |
p6eval | nom ff78b5: OUTPUT«Rat()» | ||
21:28
dual joined
|
|||
moritz conducts an experiment | 21:29 | ||
masak | moritz: hey, what's this about giving me tickets for testing? :P | 21:31 | |
sorear | masak: eh, so I just need to get to YAPC::EU someday. ok. | ||
moritz | masak: the experiment :-) | 21:32 | |
masak | my interests lie more in the area of increasing the RT queue size... | ||
sorear: yes, but not for that reason. that one discussion already happened. | |||
moritz | an attempt to suck you into the test suite :-) | ||
a mini challenge. Don't you love mini challenges? :-) | 21:33 | ||
masak | :P | ||
moritz: I admire your tenacity wrt the test suite. I occasionally make dips into it, but I find I cannot sustain maintaining it for some reason. | 21:34 | ||
I can sustain submitting rakudobugs. | |||
dalek | kudo/nom: fb53581 | moritz++ | src/core/Cool.pm: missing coercers, gfldex++ |
21:35 | |
moritz cannot sustain to stay awake, and thus fades to sleep | |||
21:35
cognominal left,
cognominal joined
|
|||
gfldex | what could "Can only use get_what on a SixModelObject" mean? | 21:36 | |
masak | moritz: dream of dozens of autonomous moritz agents, living on the 'Net and tending the test suite. | ||
gfldex: that you've somehow dropped out of the normal type system. | |||
gfldex: my guess is metamodel, or different HLL. | |||
benabik | Likely a raw parrot object leaked out somewhere. | 21:37 | |
sorear | or doing unspeakable things with pir:: | ||
gfldex | i would never even try to do unspeakable things with pir:: | ||
jnthn | metamodel is all .WHATable | ||
gfldex | say %.components.WHAT; | 21:38 | |
that's the line causing it | |||
aint have no pir:: in it | |||
jnthn | Where is that line? | ||
In a method? | |||
gfldex | yes | ||
benabik | %.components? Shouldn't there be something between % and . ? | 21:39 | |
jnthn | gfldex: OK, I'll need a bit more context. If you can golf it down to something small, I can investigate... | ||
benabik | (Although I don't think it should leak parrot into the system either. | ||
gfldex looks for his golf clubs | 21:40 | ||
masak | benabik: '%.components' looks fine to me. | 21:41 | |
benabik | masak: What does it mean? | ||
masak | benabik: it means 'public hash attribute' | ||
sorear | benabik: %.components is shorthand for self.components.hash | ||
masak | benabik: the '.' is a twigil. | ||
benabik | Oh. *facepalm* | 21:42 | |
gfldex | i'm trying to nomify a script that used to work with master | ||
benabik | I forgot . could be a twigil too. *sigh* | ||
dalek | ast: fc78e0f | masak++ | S03-operators/arith.t: added test for #100768 Because moritz++ told me to. |
21:49 | |
21:55
benabik left
21:58
mj41 left
22:02
f00li5h joined
22:04
S11001001 joined
|
|||
masak | 'night, #perl6. dream of implementations with all green in perl6.org/compilers/features | 22:09 | |
sorear | o/ S11001001 | 22:22 | |
S11001001 | hi sorear | ||
22:27
[Coke] left
|
|||
sjohnson | heh | 22:29 | |
22:29
[Coke] joined
|
|||
sjohnson | is that binary for 0xC9 ? | 22:29 | |
S11001001 | sjohnson: indeed | ||
sjohnson | oh, i didn't even see you there | 22:30 | |
i thought it was his way of saying: o/ 0b101010 | |||
iow, * | |||
sorear | what's the significance of 0xC9 | 22:35 | |
22:36
am0c left
|
|||
S11001001 | just a star trek thing | 22:37 | |
22:37
kfo left
22:38
kfo joined
|
|||
sjohnson | sorear: do you use / like C at all? | 22:40 | |
sorear | sjohnson: yes | ||
sjohnson | yes to both? :) | 22:41 | |
sorear | yes | ||
22:42
alvis left
|
|||
sjohnson | cool | 22:43 | |
another question | |||
do you know much about Programming Pearls? | |||
i wanted to beef up on some computer science knowledge, and there's that book.. and the TAOCP.. which might be too expensive, too difficult, and to large of a read | 22:44 | ||
having a hard time deciding which avenue to go down. | |||
dalek | ecza/serialize: 11c6923 | sorear++ | / (6 files): Reimplement sub "extend" functionality |
22:47 | |
ecza/serialize: 63597b7 | sorear++ | / (4 files): Reimplement return-pass, Whatever currying |
|||
sorear | sjohnson: ALL OF THEM. :D | 22:48 | |
sjohnson | not a bad idea | ||
sorear | sjohnson: I found TAOCP in a library. It still contained a few things I didn't already know | ||
sjohnson | that book's so big, probably would warrant me buying it | 22:50 | |
sorear | other things you ought to read: *SICP *Draft Report on the EDVAC (to be continued) | ||
sjohnson | thanks | 22:54 | |
no idea what it means from the title | |||
but sounds interesting nonetheless | |||
22:55
alvis joined
|
|||
TimToady | google is your friend, at least this time | 22:55 | |
22:55
S11001001 left
|
|||
sorear | the latter was a document written around '45 that outlined the design of the modern computer | 22:55 | |
it's still useful because it was written for an audience without much computer experience :D | 22:56 | ||
cognominal | nom: 'aaaa' ~~ m/ $<a>=.*/; $/<a>.perl | ||
phenny | cognominal: 30 Sep 23:48Z <[Coke]> ask cognominal to update RT#75850 with the expected output. | ||
p6eval | nom fb5358: ( no output ) | ||
sjohnson | i'd like to learn practical stuff like which data structures are good for what scenarios | ||
instead of marvel over cool abrasct computer concepts | 22:57 | ||
mostly casue i want to write an encryption app for free | |||
cognominal | nom: 'aaaa' ~~ m/ $<a>=.*/; say $/<a>.perl | ||
p6eval | nom fb5358: OUTPUT«Match.perl(orig => "aaaa", from => 0, to => 4, ast => Mu, list => ().list, hash => EnumMap.new())» | ||
sjohnson already owns applied cryptography | |||
sorear | I wouldn't trust a cryptography app unless it was written by someone famous | ||
there is a LONG history of independant cryptography apps that are actually completely useless because of a misunderstanding or something | 22:58 | ||
sjohnson | i am well aware of that, to be honest. | ||
i was hoping to pay a professianal to have a conversation with me | |||
so i could describe exactly what the protocl is | |||
protocol is | 22:59 | ||
and let me know if i'm a fool or not. | |||
obviously i'd be for free, so no one would kill me for selling a faulty product at least. | |||
sorear | what do you want to do that gpg doesn't already do? | 23:00 | |
sjohnson | gpg doesn't have perfect forward secrecy | 23:07 | |
also, i want to make a clone of Secway Simp, which encrypts IM traffic | |||
like MSN, Jabber, ICQ, etc. | |||
sorear | erm, what do you mean perfect forward secrecy | 23:09 | |
23:11
hacktor joined
|
|||
sjohnson | private key compromised | 23:11 | |
means all previous messages that you can assume were sniffed and stored somewhere are readable | |||
use a private key only for authentication, and use a diffie hellman to agree on a shared sym. key, will mean you need to solve the DH problem first, even if the private key is compromised | 23:12 | ||
only thing an attacker could do with a private key once its compromised, is pretend to be you in future conversations, and not read past ones. | |||
dalek | kudo/optimizer: a47b0cd | jnthn++ | src/Perl6/Actions.pm: Tighten up what we admit for inlining; require that the arguments are *all* mentioned. |
23:13 | |
kudo/optimizer: fb111db | jnthn++ | / (3 files): Add support for --optimize=[off|1|2|3]. The default is level 2. 'off' will not even enter the optimizer, so it skips CHECK time could-never-work analysis. Classify inlining and compile-time multi selection as level 2 for now; block inlining gets level 3 initially but should drop to two in the not too distant future; it needs some more aggressive testing. We build the setting with --optimize=3. |
|||
23:14
hacktor is now known as gttg
|
|||
sjohnson | sorear: see en.wikipedia.org/wiki/Perfect_forward_secrecy . also, Secway Simp deosn't even have PFS with their authenticated mode, they admitted in an email to me. | 23:14 | |
so my free product would probably the first one to do it. problem is, i need some better understanding of how things are done in the C programming world as well as algorithms as far as data storage go, so I don't look like the village idiot in the crypto community | 23:15 | ||
jlaire | < sjohnson> i'd like to learn practical stuff like which data structures are good for what scenarios | ||
I recommend reading "Introduction to Algorithm" and solving lots of algorithm problems | |||
sorear | sjohnson: if you want to learn about the science of algorithms and data structures, READ TAOCP. | ||
that's the main focus of the book series | 23:16 | ||
jlaire is currently reading TAOCP and likin' it | |||
sorear | sjohnson: also read anything else you can find. Ask questions here, I collect obscure algorithms and data structures. | 23:17 | |
sjohnson | thanks for the advice | ||
sorear: so TAOCP isn't 100% esoteric? | 23:18 | ||
i can apply that understanding to real world stuff? | |||
jlaire | yes | ||
sjohnson | sweet | ||
will do! | |||
sorear | sjohnson: *everything* in TAOCP is usable in the real world. | ||
sjohnson | i'll just go ahead and get the goods then | 23:19 | |
sorear | sjohnson: there are some books that are designed to be usable by people too busy to really learn how to program. TAOCP is not one of them | ||
sjohnson | uh oh. | 23:20 | |
i mean, i'm willing to put in time | |||
but i don't know if i can devote all my free time for the next 15 years to trying to make sense of TAOCP | |||
jlaire | familiarity with assembly programming for machines from the '60s is especially useful ;) | ||
sorear | sjohnson: I'd say I've devoted 10% of my free time for the last 10 years to becoming a better programmer, and I had no troble reading TAOCP. | 23:22 | |
sjohnson | oh okay | ||
i should just read it, and not assume it's going to be the most impossible thing in the world. | 23:23 | ||
there was once a time i thought it would be impossible for me to learn Perl | |||
and i stuck with that distorted view for 4 years, and avoided it whenever a perl task came up at work. then i had to learn it, bought the camel book, and was doing some impressive stuff only a few days later | |||
it was a great feeling, btw. | |||
good life lesson | 23:24 | ||
jlaire | sorear: "It still contained a few things I didn't already know" <-- was "a few things" a slight exaggeration? | ||
sorear | jlaire: do you mean understatement? | ||
jlaire | urd | ||
yes* | 23:25 | ||
sorear | jlaire: I'd say I already knew most of the really important things there, because of how long I've spent as a practicing programmer and especially how much reading I've done on algorithms | ||
jlaire | sorear: ok, I see. how much time did you spend on the exerices v. reading the book? | 23:26 | |
sorear | 2:3 or so. I didn't systematically do all the exercises | 23:27 | |
jlaire | tyvm | ||
I don't thnk anyone could do them all ;) | 23:28 | ||
sjohnson | sorear: does it deal with big O notation, for someone like me who is unable to prove notations in a CS class? | ||
or does it just assume you already know that, and skip it entirely | |||
(taocp that is) | |||
i'm not very familiar with some of the basic things, and i kind of need to start small. | |||
sorear | sjohnson: it talks about what O(n) is, yes | ||
jlaire | in that case, I'd recommend Concrete Mathematics, too | 23:29 | |
sjohnson | cool | ||
i've logged both your recommednations, by the way | 23:30 | ||
so, it's not falling on deaf ears :) | |||
sorear | sjohnson: I'm a crypto geek too, I'd be interested in seeing your designs | ||
jlaire | TAOCP has a fairly lengthy section on mathematics, but I found it a bit terse | ||
:) | |||
TimToady | O() is mostly just a funny way to talk about dimensionality | ||
jlaire | o_O | ||
TimToady: sounds interesting, can you elaborate | 23:31 | ||
sjohnson | sorear: i had one change made in GnuPG 1.4.x branch, so at least i finally contributed to something | ||
took a lot of arguing on the mailing list | |||
TimToady | it's about the size of search spaces | ||
sorear | the important thing with O() is that you understand compositionality | ||
few mortals can prove that a lookup in a distinct-set forest takes O(A^-1(N)) time | 23:32 | ||
TimToady | O(1) basically means you have to move in 0 dimensions to achieve a solution | ||
sjohnson | but the security of DH with using a private key to authenticate only gives me hope for a better future of safety :) but GnuPG is pretty cool, i do like it a lot. | ||
TimToady | O(n) means you have to move in 1 dimension | ||
O(n^2) means 2 dimensions, etc | |||
sorear | but, given that, every programmer needs to be able to intuit the time complexity of doing N lookups | ||
jlaire | .oO( moving in fractal dimensions ) |
||
TimToady | relationships between dimensions produce fractal dimensionality | ||
sorear wonders how many dimensions there are in O(A^-1(N)) | 23:33 | ||
sjohnson | .oO( ... ) is Big Think notation |
||
jlaire | sorear: what's a "distinct-set forest"? google gives no hits | ||
sjohnson | i also need to remember what log cruves sort of look like too. | ||
curves* | 23:34 | ||
TimToady | they keep getting flatter, but never go flat | ||
just like exponentials never quite go straight up | |||
23:35
gttg left
|
|||
sorear | en.wikipedia.org/wiki/Disjoint-set_...et_forests | 23:36 | |
jlaire | oh, disjoint makes more sense | ||
sorear | sjohnson: a log curve is one where going from 1 to 10 is 1 unit, and so is going from 1000 to 10000 | 23:37 | |
TimToady | fractal branches are generally disjoint | ||
sjohnson | i wonder how much of this stuff that facebook guy knew, before he made billions | 23:38 | |
i wonder if there's a point where one knows too much math | |||
jlaire was told that the lookup is "practically amortized constant" when learning about this data structure | 23:39 | ||
jnthn wonders if there's a point where on feels they know too many anything :) | |||
*one | |||
Well, there's probably some things I'd rather not know about but...there's always something interesting more to learn. :) | |||
jlaire | technical skills probably weren't the reason he made billions | ||
TimToady wonders whether knowing both too little and too much about something are really mutually exclusive... | 23:40 | ||
jnthn | :) | 23:41 | |
sorear | I think making billions is mostly a function of being evil | ||
TimToady | neither the converse nor the inverse follow, of course :) | 23:42 | |
dalek | kudo/optimizer: c191cfe | jnthn++ | src/Perl6/Optimizer.pm: Improve error reporting. When we determine a call could never work, shows the desired signature(s) in the error. |
||
kudo/optimizer: b5d2c9b | jnthn++ | src/Perl6/Actions.pm: Try to get better line reporting for calls. |
23:45 | ||
23:46
jaldhar joined
23:50
itz left
23:53
cggoebel joined
23:57
itz joined
23:59
wolfman2000 joined
|