»ö« 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.
00:00 zby_home_ left
colomon well, why don't we start with shell, then? 00:05
there are like 20 test files that depend on Test::Util...
sorear mm 00:06
colomon I'm willing to take a stab at implementing it if you're busy with something else. 00:07
sorear right now I'm stabbing at MMD+junctions, so yeah
colomon do you have any quick pointers to the relevant C# library functions? 00:08
sorear you want Mono.Unix.Native.Stdlib.system (public static int system(string string);)
eventually we should also support the native C# System.Diagnostics.Process API 00:09
which is very close to the native Windows API, and rather poorly suited for Linux
(in particular, Windows and thus C# has no API for "invoke program given string[] args")
00:16 zby_home joined 00:19 replore_ joined
colomon is it okay for niecza to be using Mono.Unix.Native.Stdlib? 00:20
The type or namespace name `Unix' does not exist in the namespace `Mono'. Are you missing an assembly reference?
bother
geekosaur don't see it offhand in the mono build from macports 00:22
colomon I'm actually using a mono binary which came straight from the mono project. 00:23
(on OS X)
00:26 bluescreen10 left 00:27 zby_home__ joined 00:28 zby_home left
sorear colomon: niecza loads Mono.Unix.Native.Stdlib at runtime 00:28
colomon yeah, just looking at that
sorear you can probably follow the example of the delegate functions
colomon seems like I want to m_system = Syscall.GetMethod("system") 00:29
sorear system would be in Stdlib
colomon right 00:30
00:30 leprevost_ left, Maddingue joined
LlamaRider Any idea how I can make a Pair inside a {} block? Example: 00:30
rakudo: my @a=(1,2); say @a.map({ 2*$_ }); say @a.map({ $_ => 2*$_ });
p6eval rakudo 38165a: OUTPUT«2 4␤use of uninitialized variable $_ of type Any in numeric context␤use of uninitialized variable $!key of type Any in string context␤Method 'count' not found for invocant of class 'Hash'␤ in method reify at src/gen/CORE.setting:4380␤ in method reify at src/gen/C…
sorear but you could also copy the Deelegate.CreateDelegate version 00:31
LlamaRider: any way but that
LlamaRider Such a mathematical answer ^^
sorear for instance, $( $_ => 2 * $_ ) would work
LlamaRider O_O never seen that syntax before 00:32
how do you plug it in a map, and what is $() ?
sorear $() is a mostly noop expression
any noop will do
00:32 Lothbot joined
sorear just... don't have => at the top level 00:32
what ways did you try before asking for help? 00:33
LlamaRider the one I mentioned. I know the explicit one via Pair.new, but that isn't pretty
00:34 Lothar left
sorear that would have worked too 00:34
diakopter perl6: class A { has $!b; say $!b }
p6eval pugs b927740: OUTPUT«*** Undeclared variable: ("$__SELF__",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0x7f334e8e51f9>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0x7f334e8e7199>}),("@_",PELexical {pe_type = (mkType "Array"), pe…
..niecza v13-194-gf409a86: OUTPUT«===SORRY!===␤␤Variable $!b used where no 'self' is available at /tmp/4lEUitm6uh line 1:␤------> class A { has $!b; say ⏏$!b }␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 919 …
..rakudo 38165a: OUTPUT«Can only use repr_get_attr_obj on a SixModelObject␤ in <anon> at /tmp/MeEUQS0ULK:1␤ in block <anon> at /tmp/MeEUQS0ULK:1␤ in <anon> at /tmp/MeEUQS0ULK:1␤»
00:34 Lothbot is now known as Lothar
sorear diakopter! Are you feeling better? 00:35
diakopter meh
pugs response is funny
sorear offers hugs as appropriate 00:36
LlamaRider rakudo: my @a=(1,2); say @a.map({ ($_ => 2*$_ ) }); 00:37
p6eval rakudo 38165a: OUTPUT«1 2 2 4␤»
LlamaRider this works, but it is slowly turning into a bracket onion :)
00:42 LlamaRider left
colomon ooo, I got a compile.... 00:43
benabik nom: my $a = 1,2; say @a.map: (2 * *) 00:46
p6eval nom 38165a: OUTPUT«===SORRY!===␤Variable @a is not predeclared at line 1, near ".map: (2 *"␤»
benabik nom: my @a = 1,2; say @a.map: (2 * *)
p6eval nom 38165a: OUTPUT«2 4␤»
benabik nom: my @a = 1,2; say @a.map: { $^n => 2 * $^n } 00:47
p6eval nom 38165a: OUTPUT«1 2 2 4␤»
colomon \o/ 00:48
00:49 bacek left
colomon oh, blast 00:53
Test::Util fails with is export(:DEFAULT) -- Export tags NYI now. :( 00:54
[Coke] wonders if rt.perl.org/rt3/Ticket/Display.html?id=76648 is a bug.
rakudo: class Foo { has $.bar; has $.baz; has $.biff }; Foo.^methods.join(", ").say; 00:55
p6eval rakudo 38165a: OUTPUT«bar, baz, biff␤»
[Coke] rakudo: class Foo { has $.bar; has $.baz; has $.biff }; Foo.^methods.join(", ").say;
p6eval rakudo 38165a: OUTPUT«bar, baz, biff␤»
[Coke] rakudo: class Foo { has $.bar; has $.baz; has $.biff }; Foo.^methods.join(", ").say;
p6eval rakudo 38165a: OUTPUT«bar, baz, biff␤» 00:56
[Coke] (jut making sure it didn't change order.)
00:57 replore_ left, jupp1 left
dalek ecza: 981626c | sorear++ | lib/ (2 files):
Refactor MMD a bit, add junction support
00:57
ast: 9ba6fa4 | sorear++ | S03-junctions/autothreading.t:
[S03-junctions/autothreading] Unfudge MMD tests
sorear This gets a few more. Hopefully without breaking anything else.
colomon I'm spectesting with my patch at the moment, but I'll run another with yours as soon as this is done. 00:58
[Coke] rakudo: %*h.push: 1 => 2; %*h.perl.say 00:59
p6eval rakudo 38165a: OUTPUT«Method 'push' not found for invocant of class 'Failure'␤ in block <anon> at /tmp/f6IrtEzwYb:1␤ in <anon> at /tmp/f6IrtEzwYb:1␤»
[Coke] colomon: ooh, lemme know hen I can do another comparison run.
colomon [Coke]: my patch hasn't gotten us any new tests yet :(
[Coke] rakudo: role A[::T] { state $foo; say ++$foo }; A[Int]; A[Str] 01:00
p6eval rakudo 38165a: ( no output )
sorear [Coke]: I see what's going on there 01:02
[Coke] rakudo: class AB{has @.x; method aa { my @y=1,2,3; .say for @y[1 .. +@y]; .say for @.x; .say for @.x[1 ..^ +@.x] } };my AB $y.=new(:x(1,2,3)); $y.aa;
p6eval rakudo 38165a: OUTPUT«2␤3␤Any()␤1␤2␤3␤2␤3␤»
dalek ecza: cda492b | (Solomon Foster)++ | lib/ (2 files):
Stab at implementing shell using Stdlib.system.
[Coke] sorear: I'm going through some old rakudo tickets, FYI. 01:03
rakudo: my %h = {"a" => "b"}; %h{"a"} = %h.delete("a"); say %h.perl; 01:04
p6eval rakudo 38165a: OUTPUT«().hash␤»
[Coke] sorear: so, where now?
rakudo: say (1..10).sort(&rand) 01:05
p6eval rakudo 38165a: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in sub rand at src/gen/CORE.setting:3053␤ in method reify at src/gen/CORE.setting:4380␤ in method reify at src/gen/CORE.setting:4285␤ in method gimme at src/gen/CORE.setting:4649␤ in method eager at …
[Coke] rakudo: 1 / 10000000000000000000000000000000 ; say "alive" 01:06
p6eval rakudo 38165a: OUTPUT«alive␤»
sorear [Coke]: do you mean my next project? two-level attribute storage 01:07
*naming rather
[Coke] you said, "i see what's going on there.", I didn't know which there you were. 01:08
rakudo: my @a = <one two>; @a[-1] = 'zero'; @a.perl
p6eval rakudo 38165a: OUTPUT«Cannot assign to a non-container␤ in block <anon> at /tmp/55lCbf7U7p:1␤ in <anon> at /tmp/55lCbf7U7p:1␤»
sorear [Coke]: A[Str]; A[Int]
colomon sorear: spectest passes with your latest changes too 01:11
[Coke] rakudo: say %( \( (:a(2)) )).WHAT 01:12
p6eval rakudo 38165a: OUTPUT«EnumMap()␤»
colomon Unhandled exception: Niecza.Serialization.ThawException: dated sources 01:13
sorear: ^^ ??????
[Coke] rakudo: say %( \( (:a(2)) )).isa(Positional)
p6eval rakudo 38165a: OUTPUT«Bool::False␤»
sorear colomon: how did you pull THAT one off? 01:15
[Coke] rakudo: class foo { has $!baz = 'ipsum'; method bar { my $!baz = 'lorem'; say $!baz; }; }; my $foo = foo.new; $foo.bar;
p6eval rakudo 38165a: OUTPUT«ipsum␤»
colomon I changed Test::Util just a tad and then reran the test file I've been trying to get to work. 01:16
[Coke] rakudo: say (my $a) = 1,2,3; say $a
p6eval rakudo 38165a: OUTPUT«1 2 3␤1 2 3␤»
[Coke] rakudo: say ((my $a) = 1,2,3);
p6eval rakudo 38165a: OUTPUT«1 2 3␤»
[Coke] rakudo: (say (my $a)) = 1,2,3; 01:17
p6eval rakudo 38165a: OUTPUT«Any()␤Cannot assign to a non-container␤ in block <anon> at /tmp/df58A5abKz:1␤ in <anon> at /tmp/df58A5abKz:1␤»
sorear colomon: sounds like you've found a way to break the compilation cache :( 01:18
colomon make realclean? 01:19
[Coke] rakudo: 1 .. 2 .. 3
p6eval rakudo 38165a: ( no output )
[Coke] st: 1 .. 2 .. 3
std: 1 .. 2 .. 3
p6eval std dc62e1d: OUTPUT«===SORRY!===␤".." and ".." are non-associative and require parens at /tmp/Ap8Q2Xqvcf line 1:␤------> 1 .. 2 .. ⏏3␤Check failed␤FAILED 00:01 109m␤»
sorear colomon: probably
colomon: are you doing anything with BEGIN in your Test::Util? 01:20
[Coke] rakudo: 01
p6eval rakudo 38165a: ( no output )
[Coke] rakudo: NaN.Rat
p6eval rakudo 38165a: OUTPUT«(timeout)» 01:21
[Coke] rakudo: say { $^x }.assuming(1).signature 01:22
p6eval rakudo 38165a: OUTPUT«Method 'assuming' not found for invocant of class 'Block'␤ in block <anon> at /tmp/sGW5kK1mNs:1␤ in <anon> at /tmp/sGW5kK1mNs:1␤»
01:22 dku left
colomon There's no BEGIN that I can see, the only "weird" thing I notice is a proto 01:23
01:24 tokuhirom left, tokuhirom joined
[Coke] rakudo: say 684-76 01:25
p6eval rakudo 38165a: OUTPUT«608␤»
colomon still getting it after make realcvlean
other things work fine 01:26
[Coke] rakudo: "foo" ~~ /<B::TOP>/
p6eval rakudo 38165a: OUTPUT«Method 'B' not found for invocant of class 'Cursor'␤ in regex <anon> at /tmp/A3AivIfbMB:1␤ in method ACCEPTS at src/gen/CORE.setting:7260␤ in block <anon> at /tmp/A3AivIfbMB:1␤ in <anon> at /tmp/A3AivIfbMB:1␤»
[Coke] akudo: my ($a is readonly) = 5; say $a; $a = 42; say $a 01:29
rakudo: my ($a is readonly) = 5; say $a; $a = 42; say $a
p6eval rakudo 38165a: OUTPUT«5␤42␤»
sorear colomon: :( I'll look at it later
01:29 tokuhirom left
[Coke] rakudo: my @a=0..*; @a[Inf]=3; say @a[Inf]; # found by lue 01:29
p6eval rakudo 38165a: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(\$v, Mu *%_)␤␤ in method Numeric at src/gen/CORE.setting:646␤ in sub infix:<+> at src/gen/CORE.setting:2192␤ in method exists at src/gen/CORE.setting:4634␤ in method at_pos…
01:42 Trashlord left
colomon niecza: my @a = <a b c d>; say @a.WHAT 01:43
p6eval niecza v13-198-gcda492b: OUTPUT«Array()␤»
01:43 Trashlord joined
dalek ecza: 938e43f | sorear++ | lib/ (6 files):
Track what classes various attributes came from, and add overloads of GetSlot/SetSlot that check for matches
01:44
sorear this is only the lead-up to an eventual relaxation of the "unique attribute names" rule
01:45 Trashlord left 01:47 Trashlord joined 01:48 jferrero joined, jferrero left 01:49 jferrero joined 02:09 replore_ joined 02:14 leprevost joined
dalek ecza: 67bd4e6 | sorear++ | lib/ (9 files):
Specify types when accessing attributes in the C# code
02:28
02:29 zby_home__ left, zby_home_ joined 02:33 panterax_ left 02:38 abercrombie joined 02:47 abercrombie left 02:55 jeffreykegler joined 02:57 jeffreykegler left
colomon woah, a whole batch of test failures after those last two patches, sorear 02:59
sorear: look at t/spec/S14-roles/attributes.t 03:02
(for example)
dalek ecza: 0c7c992 | sorear++ | / (6 files):
Now also specify the types for Perl 6 accesses
03:06
03:07 zjmarlow joined, zjmarlow left, zjmarlow_ joined
[Coke] gist.github.com/1476841 - # 01/10/2012 - niecza at 97.37% 03:08
sorear colomon: thanks
dalek ecza: 2fbf907 | sorear++ | lib/Kernel.cs:
Reset AttrInfo.owner when composing roles, fixes S14-roles/attribute.t
03:10
sorear owwww 03:13
all of S14 works now except anonymous.t - which had a bug in the tests that is just now discovered! 03:14
03:14 zjmarlow_ left
sorear colomon: any fails outside S14? 03:14
03:14 zjmarlow_ joined
colomon t/spec/S32-str/capitalize.t and uc.t 03:16
t/spec/S12-construction/autopairs.t
rest are S14
afk # bed
sorear good night 03:20
03:20 abercrombie joined
dalek ast: b4bf84f | sorear++ | S14-roles/anonymous.t:
[S14-roles/anonymous] Do not try to mutate 3; refude for niecza
03:20
sorear all the colomon-reported fails are working now 03:21
03:24 replore_ left
dalek ecza: 11e7c79 | sorear++ | lib/ (2 files):
Remove old typeless Get/SetSlot
03:25
03:26 motherbrain joined
motherbrain pastebin.com/kKGBa1nC 03:26
have fun :)
sorear motherbrain: Why are you posting that here? It's not Perl 6. 03:29
motherbrain its perl maybe not version 6
geekosaur this channel is for perl 6 development
motherbrain sorry 03:30
sorear is having trouble finding the backdoor installer 03:31
motherbrain nc -l 5000 on the shell :) 03:34
sorear your current behavior is very suggestive of someone who is trying to recruit zombies 03:35
motherbrain no just joking around 03:37
03:38 Psyche^ joined
motherbrain plus that wouldn't work very well for long term 03:38
03:38 orafu left 03:39 orafu joined 03:42 Patterner left, Psyche^ is now known as Patterner 03:45 thou joined, zjmarlow_ left, zjmarlow__ joined 03:48 zjmarlow_ joined, zjmarlow__ left
dalek ecza: 2a36cd1 | sorear++ | lib/ObjModel.cs:
Enable using the same attribute name twice in one inheritence hierarchy
03:58
sorear rakudo: say Pair.^attributes 04:03
p6eval rakudo 38165a: OUTPUT«$!key $!value␤»
sorear rakudo: class Foo { has $.foo } ; say Foo.^attributes 04:06
p6eval rakudo 38165a: OUTPUT«$!foo␤»
04:08 HarryS left 04:11 HarryS joined 04:14 zjmarlow_ left, zjmarlow_ joined 04:22 lestrrat left 04:23 lestrrat joined 04:33 zjmarlow joined 04:35 zjmarlow_ left 04:39 zjmarlow left
kshannon In regards to LTM, according to the specs atm as I understand them gist.github.com/1593074 should be matching via rule b. 04:53
It is possible to do that way, but it's not easy. The current implementations (including the new NFA stuff in the new nqp branch) don't because it's a giant pain in the ass.
I reckon most real life grammars won't be trying to take advantage of the spec as is, and will actually likely be fine with the current implementation.
Do you think we should change the spec to match the implementations?
sorear niecza: gist.github.com/1593074 04:55
p6eval niecza v13-204-g2a36cd1: OUTPUT«#<match from(0) to(5) text(xxxxx) pos([].list) named({"a" => #<match from(0) to(5) text(xxxxx) pos([].list) named({}.hash)>}.hash)>␤»
04:55 birdwindupbird joined
kshannon Yeah, it matches via the second branch of <a>, but TOP only chooses <a> because of LTM for the first branch. 04:56
sorear niecza: grammar LTM-Hell { rule TOP { [ <a> | <b> ] }; token a { [ xxxxx <!> | xxx <?> xx ] }; token b { [ xxxx <?> x ] } }; say LTM-Hell.parse('xxxxx').keys 04:57
p6eval niecza v13-204-g2a36cd1: OUTPUT«a␤»
sorear niecza: grammar LTM-Hell { token TOP { [ <a> | <b> ] }; token a { [ xxxxx <!> | xxx <?> xx ] }; token b { [ xxxx <?> x ] } }; say LTM-Hell.parse('xxxxx').keys
p6eval niecza v13-204-g2a36cd1: OUTPUT«b␤»
sorear LTM doesn't work in rules in niecza
kshannon Hmmm...
So it isn't such a pain in th ass for you :) 04:58
I guess I'm going to have to checkout niecza...
sorear that said, I'm planning to change it to a for performance reasons 04:59
05:00 Lothar left
kshannon lol 05:00
So I guess my question still stands. 05:01
sorear it works in niecza because <!> is a little bit special
TimToady the <ws> rules have changed recently so that rules should be much saner on LTM
05:01 Lothar joined
sorear most zero-width assertions are completely ignored during declarative analysis, by deuterospec 05:02
but for some reason niecza respects <!> in LTM
TimToady but <!> and <?> are short lookaheads, it can be argued
so we ignore ! and take the ? path
kshannon Well, replace them with appropriate fail and pass sequence points... 05:03
My question is not actually about the <?> and <!>
TimToady but the LTM is supposed to allow backoff to the next best case, which STD's fate system allowed, so it would have picked b 05:04
(I think)
kshannon Yeah, I agree that the answer should be b as currently specced, I'm just saying that being able to do that efficiently is not easy. 05:05
(That's efficient in both space and time)
sorear TimToady: But <a> doesn't fail.
TimToady: <a> has a longer declarative prefix, and <a> succeeds
TimToady: but the path within <a> that succeeds is shorter than the declarative prefix of <b>, because <a> matches *less* than its declarative prefix 05:06
TimToady with fates, it only succeeds down into the first branch of a
that's why they're called "fates"
you don't have to keep rerunning the LTM at each level; the top level figgers it all out 05:07
sorear interesting 05:08
this is the first actual problem I've seen resulting from abandoning fates
kshannon The top level figuring it all out is easy. Passing that knowledge into the regex subs requires interesting gymnastics. 05:09
dalek ecza: c3a0699 | sorear++ | / (8 files):
Change the true names of attributes to include the sigil
TimToady it doesn't occurs so much when using regex for a well-bahaved language, but I see it arising rather more often in user-defined langauges
kshannon: well, STD did exactly that
sorear kshannon: in TimToady's grammar engine, there's a list of pre-decided LTM choices tacked onto the cursor object
TimToady so at least there's prior art, for some definition of "art" 05:10
kshannon sorear: Is your version in niecza currently using the TimToady engine from STD?
sorear kshannon: No 05:11
kshannon OK, two things to look at then :)
sorear It's STRONGLY based on the TimToady engine 05:12
but one of the changes I made was to get rid of fates
kshannon I'll check out STD first then.
05:12 raiph joined
TimToady it seemed to me that fates solved both an efficiency problem and a correctness problem 05:13
05:18 dk_ joined 05:21 raiph left 05:46 mkramer joined 05:53 PZt joined 06:10 kaleem joined, sayu joined 06:12 koban joined 06:17 dk_ left 06:35 tokuhirom3 joined 06:51 molaf joined
sorear nom: class Foo { has $!x }; say $(Foo.new)!Foo::x 06:53
p6eval nom 38165a: OUTPUT«===SORRY!===␤Cannot call private method 'x' on package Foo because it does not trust GLOBAL at line 1, near ""␤»
sorear o/ kst 06:55
06:55 s1n joined
dalek kudo/staged-settings: c4303e3 | moritz++ | / (3 files):
move some operators to second setting
06:56
06:56 sayu left 06:58 zby_home_ left
dalek ecza: 0d27950 | sorear++ | / (5 files):
Implement "trusts" and checking thereof
07:02
sorear only +4 tests though.
07:04 birdwindupbird left 07:05 wtw joined
dalek atures: 259cdf2 | moritz++ | features.json:
niecza trusts
07:08
07:13 nornagest joined
dalek ecza: 0ab28e3 | sorear++ | / (2 files):
$!x is a direct ref, not a private method call

The private-method accessors are still created for use on other objects.
07:13
07:17 snearch joined
sorear moritz: What do "Adding methods" and "Role composition" under MOP mean? 07:18
dalek atures: 0b734d7 | sorear++ | features.json:
Fill out blanks on niecza column, updates, acknowledge regressions
07:20
moritz sorear: if you can do these things through the MOP 07:21
07:29 nornagest left 07:59 panterax_ joined
sorear -> sleep 08:03
08:10 bacek joined 08:18 mkramer left 08:36 Guest73178 joined
Guest73178 :D 08:36
08:36 mj41 joined 08:39 Guest73178 left, snearch left 08:40 snearch joined 08:41 snearch left 08:44 snearch joined 08:45 snearch left 08:46 snearch joined, cognominal left 08:47 cognominal joined, snearch left, snearch joined
moritz phenny: tell LlamaRider re pair in a block, you can use a semicolon to disambiguate a block with a pair from a hash literal: @a.map: {; $_ => 2 * $_ } # fewer parentheses for the win 08:49
phenny moritz: I'll pass that on when LlamaRider is around.
08:49 snearch left
moritz though of course you can write that as @a Z=> (2 X* @a) too :-) 08:49
08:50 snearch joined 08:55 snearch left 08:56 snearch joined 08:58 snearch left, snearch joined 09:08 daxim joined 09:09 thou left 09:14 carlin left
tadzik good morning :) 09:18
09:20 xinming joined
moritz \o tadzik 09:20
09:23 jupp joined 09:25 xinming left 09:27 dakkar joined
kshannon this fates stuff in STD is a wonderful way to do the LTM... 09:36
now if only I could make sesnse of it :) 09:37
moritz :-) 09:38
09:38 jupp left 09:47 birdwindupbird joined
masak mornin', #perl6 09:55
09:55 cognominal left, cognominal joined 09:56 jupp joined
moritz it's masak! 09:57
tadzik hello masak 09:58
masak hello tadzik 10:03
late. I woke up it today. 10:04
tadzik took me a while to parse
while. Too me it to parse
* Took 10:05
ah, I fail at this :)
moritz did you mean "fail. I at it"? :-)
tadzik mean. I did it 10:06
moritz speaking of "fail"... 10:07
the staged-settings branch fails in some rather curious ways
for example I've moved Grammar to the second setting 10:08
and when you write grammar A { }, the code that adds Grammar as a superclas to A silently fails
*superclass even
which means that not only do you not get Grammar as a parent class... 10:09
but also not Any or Mu
which leads to curious test failures
masak tadzik: en.wikipedia.org/wiki/Topic%E2%80%93comment 10:12
moritz $_ # for short :-) 10:14
or more elaborately: given $topic { .comment } 10:15
erm, .comment given $topic; # :-)
masak aye :) 10:17
moritz nom: class Topic is Str { method new($_) { nqp::box_s(nqp::unbox_s(.Str), self) }; method comment { say "Talking about {self}" } }; .comment given Topic.new('Perl 6')
p6eval nom 38165a: OUTPUT«Talking about Perl 6␤»
masak nom: class Topic is Str { method new($_) { nqp::box_s(nqp::unbox_s(.Str), self) }; method comment { say "Talkin' 'bout {self}" } }; .comment given Topic.new("you and me, and the games people play") 10:18
p6eval nom 38165a: OUTPUT«Talkin' 'bout you and me, and the games people play␤»
moritz masak++ # cultural reference that I get, for once :-) 10:20
10:20 xinming joined
moritz anyway, the example of inheriting from base types IMHO demonstrates that boxing and unboxing should be somehow exposed to the user space 10:21
nom: say Str.new('foo')
p6eval nom 38165a: OUTPUT«Default constructor only takes named arguments␤ in method new at src/gen/CORE.setting:558␤ in block <anon> at /tmp/TfnUcTW2ke:1␤ in <anon> at /tmp/TfnUcTW2ke:1␤»
masak moritz: fun trivium: the song was inspired by the pop-psychology book "Games people play" by Eric Berne 10:22
moritz we could of course provide such constructors, but it forces you to create more GCables
masak we got a thank-you comment on the Perl 6 Advent calendar: perl6advent.wordpress.com/2011/12/2...mment-1288
moritz masak: have you read that book? 10:23
masak yes.
moritz: boxing and unboxing *is* exposet to user space. it's just not very pretty :)
exposed*
moritz masak: erm, I meant in a portable fashion :-) 10:24
masak: can you recommend it?
masak "portable"?
moritz nqp:: ops aren't portable across implementations
masak I can recommend the book. it has a curious but interesting definition of "game" in a social setting.
don't know how to explain it simply, but it's a little something like "con" or "trick" -- except with feelings instead of money. 10:26
and with the con man not being fully conscious of the exploit.
the book is a tad old and a bit US-centric. but still interesting. 10:27
moritz puts it on his amazon wishlist 10:29
10:29 xinming left
masak enjoys seeing diakopter in the backlog 10:30
moritz enjoys backlogging the abstruse goose comics :-) 10:31
perl6: gist.github.com/1586644 10:34
p6eval rakudo 38165a: OUTPUT«(timeout)3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564… 10:35
..pugs b927740: OUTPUT«*** ␤ Unexpected "[$"␤ expecting formal parameter or ")"␤ at /tmp/mCv536W7YX line 16, column 10␤»
..niecza v13-207-g0ab28e3: OUTPUT«(timeout)3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712…
moritz rakudo got *further* than niecza before timeouting?
masak moritz: "Assume the cow is a solid ball. Banach-Tarski the hell out of it. Rinse. Repeat." :P 10:37
10:41 cognominal_ joined, cognominal left, snearch left
moritz :-) 10:42
the abstruse goose comics are often a bit more abstruse than XKCD, but they quite often resonate with some part of me 10:43
masak aye. 10:44
10:45 panterax__ joined
moritz nom: say (42, 'foo', Any).grep: &defined 10:46
p6eval nom 38165a: OUTPUT«===SORRY!===␤Symbol '&defined' not predeclared in <anonymous> (/tmp/EulyycuoWH:1)␤»
moritz nom: say (42, 'foo', Any).grep: &prefix:sym<defined>
p6eval nom 38165a: OUTPUT«===SORRY!===␤Symbol '&prefix:sym<defined>' not predeclared in <anonymous> (/tmp/tMywm_nlXy:1)␤»
moritz nom: say (42, 'foo', Any).grep: &prefix:defined
p6eval nom 38165a: OUTPUT«===SORRY!===␤Symbol '&prefix:defined' not predeclared in <anonymous> (/tmp/U8RztJ9VJR:1)␤»
10:49 panterax_ left
masak nom: say &defined 10:53
p6eval nom 38165a: OUTPUT«===SORRY!===␤Symbol '&defined' not predeclared in <anonymous> (/tmp/gRcOxOlczE:1)␤»
masak b: say &defined
p6eval b 1b7dd1: OUTPUT«Could not find sub &defined␤ in main program body at line 22:/tmp/kq3M4ReDMZ␤»
masak nom: say (42, 'foo', Any).grep: *.defined 10:54
p6eval nom 38165a: OUTPUT«42 foo␤»
10:54 skids left
masak nom: say &foo; sub foo {} 10:54
p6eval nom 38165a: OUTPUT«sub foo() { ... }␤»
masak nom: say &foo
p6eval nom 38165a: OUTPUT«===SORRY!===␤Symbol '&foo' not predeclared in <anonymous> (/tmp/7YmgXCNZA0:1)␤»
moritz and not postdeclared either :-)
masak I don't really like the error message, because the symbol '&foo' is not predeclared even in the former... right. 10:55
masak submits rakudobug for LTA error message
the issue with the error message has something to do with that it doesn't correctly identify the error. 10:56
'&foo' doesn't need to be predeclared; it just needs to be declared.
moritz aye; rakudo just has a single code path for all the undeclared symbol errors 10:58
and everything else needs to be predeclared
we could just change it to "not declared"
and then the user needs to know in each case if post-declaration is sufficient 10:59
10:59 arnsholt left 11:08 xinming joined 11:10 Tene left 11:15 arnsholt joined
masak heh -- based on the server logs to my blog, I should really write a post called "longest common substring" :) 11:16
moritz :-) 11:17
when I wrote a German Perl 6 beginner's tutorial, I got lots of hits from google for search terms like "perl if", "perl while", "perl for" 11:18
and I kinda felt bad, because 99% of them were looking for the Perl 5 forms, not the Perl 6 ones
masak yeah, that's kind of what I'm thinking here as well. 11:20
maybe I'd do the world a service by writing a really approachable introduction to LCS with suffix trees. 11:21
that'd probably by fun to write up as well.
in my abundant spare time. :/
11:24 wolv is now known as wolverian 11:32 spine_ joined 11:34 djanatyn joined, Tene joined, Tene left, Tene joined 11:37 m0ck joined 11:38 m0ck left 11:43 birdwindupbird left, tokuhirom3 left, mtk left, baest left, kcwu left 11:47 birdwindupbird joined, tokuhirom3 joined, mtk joined, baest joined, kcwu joined, japhb joined, wooden joined 11:52 xinming left
arnsholt masak: Don't you have a time-travelling debugger? =) 12:02
You can manufacture spare time =D
12:03 replore joined 12:04 xinming joined 12:06 rsimoes1 joined
masak I wish... :) 12:06
12:06 benabik left
masak suffix trees are so wonderful that in order to do them justice, I'd probably have to write a blog post only about them. 12:10
with an adjoining Perl 6 implementation, of course.
that would probably make the LCS blog post easier to write, as well.
felher masak: +1
masak here's a problem I've always liked: given that we can do .comb.rotate($N).join with any $N on a given string, find the lexicographically smallest such rotated string. 12:12
nom: given "pancakes" { say [min] (.comb.rotate($_).join for ^.chars) } 12:13
p6eval nom 38165a: OUTPUT«0␤»
masak hrm.
nom: given "pancakes" { say (.comb.rotate($_).join for ^.chars) }
p6eval nom 38165a: OUTPUT«0 1 2 3 4 5 6 7␤»
masak not... what I expected. 12:14
oh!
nom: given "pancakes" -> $s { say ($s.comb.rotate($_).join for ^$s.chars) }
p6eval nom 38165a: OUTPUT«pancakes ancakesp ncakespa cakespan akespanc kespanca espancak spancake␤»
masak I often expect $_ to mean two loop current-elements at once :P
nom: given "pancakes" -> $s { say [min] ($s.comb.rotate($_).join for ^$s.chars) }
p6eval nom 38165a: OUTPUT«akespanc␤» 12:15
cognominal_ LCS?
masak cognominal_: "Longest Common Substring"
cognominal_: since a year back, that's been the most common set of search words to find my blog.
now, the above algorithm is O(N**2) where N is the length of $s. with suffix trees, it can be solved in O(N) time. 12:16
I've managed to explain to myself how, but it still tickles my intuition sometimes. :) 12:17
even with LCS, I have some kind of intuition that the problem "should" be O(N**2). I guess that's why suffix trees are relatively unknown outside some fairly specific circles. 12:19
colomon moritz: in my informal tests here, rakudo was quite competitive speed-wise with niecza out until about digit 1900, when it seemed like some sort of awkward garbage collection (guess) slowed rakudo down a bit.
12:22 _jaldhar left 12:25 jaldhar joined 12:26 replore left, replore joined, bluescreen10 joined
kshannon from S05: "The first || in a regex makes the token patterns on its left available to the outer longest-token matcher" 12:26
In "A [ B1 || B2 ] C" does the outer LTM grab all the way to C? (i.e. A B1 C) 12:27
That seems wrong somehow...
and not at all intuitive
12:27 mtk left
masak well, C still has to match if B1 matches. 12:28
12:28 mtk joined
masak but then C would have to match "procedurally" if B2 matches, since we're then in procedural mode. 12:28
kshannon exactly.
masak I can't condemn it as wrong, but I agree it feels slightly odd. 12:29
12:30 jupp left
kshannon I'm just trying to get it all straight in my head to work out what needs to be done to do it correctly. gist.github.com/1594445 is my current braindump. 12:31
I was re-reading S05 and discovered I was wrong about how || and && interact with LTM. 12:32
12:32 rsimoes1 left
kshannon (The reason for introducing the term P.P. - Partially Proedural was because of my thoughts on NFA construction anc caching) 12:33
moritz brains the read-dump 12:34
erm, the other way round
12:34 rsimoes1 joined
kshannon Also, it seems that eager (non-greedy) quantifiers don't participate at all in LTM; I had assumed that they would allow up to the minimum repetitions. 12:34
moritz ah, LTMP is what I've called "declarative prefix" in perlgeek.de/en/article/longest-token-matching 12:35
cognominal_ I am not sure what "braining the read-dump" would mean, but I am sure it would be cool.
kshannon :)
moritz hm 12:36
if you token foo { a+ }, can you consider <foo> declarative? 12:37
because it actually translates to a+:
12:37 hanekomu joined 12:38 bluescreen10 left
kshannon OK, I haven't seen that specced anywhere. 12:40
That does change things.
masak moritz, cognominal_: the best spam I ever got was a dissociated-press word salad of various computer books. somewhere in there it had the phrase "at any given moment, brain in a way that sticks". this message has always stayed with me somehow. 12:41
12:41 kaleem left
moritz kshannon: well, it is specced that 'token' implies :ratchet 12:41
masak moritz: why would :ratchet conflict with declarative?
kshannon Except, as far as I can tell ratcheted doesn't stop LTM. 12:42
typing too slow... :(
masak moritz: it's not backtracking (or the lack of it) that conflicts with declarative, it's other types of decisions.
moritz masak: because there are no possessive quantifiers are not present in regular languages
masak please rephrase :)
moritz erm, yes
because there are no possessive quantifiers in regular languages 12:43
cognominal_ masak, smartly constrained randomness is a well know surrealist device : en.wikipedia.org/wiki/Surrealist_techniques
masak cognominal_: oh yes. I really enjoyed "The Policeman's Beard Is Half-Constructed".
cognominal_ "le cadavre exquis boira le vin nouveau" 12:44
masak moritz: you may have a point.
cognominal_: :)
12:44 benabik joined
masak cognominal_: talk about a waste of wine :P 12:44
kshannon The synopsis doesn't actually say we're talking about a regular language. It uses the terms pure and declarative. 12:48
Of course, if it's not regular you need more than a DFA or NFA to parse it.
masak right. 12:49
moritz I thought the plan had always been to spec LTM in a way that a DFA can handle the LTM part
kshannon I don't think you need much more to do ratchet semantics - possibly even a quick and simple postprocess of the DFA results. 12:51
I'll need to do more thinking about that one.
moritz too 12:53
12:53 donri joined, bluescreen10 joined
kshannon moritz: "declarative prefix" <-- I like that term, I'll use it from now on 12:54
13:01 jupp joined
masak \o/ 13:15
it's a best-of-both worlds thing. NFAs are awesome, but limited in scope. we've become accustomed to and dependent on the parts of "regexes" that aren't really (NFA) "regular expressions", but those slow things down. 13:19
so Perl 6 grammars, through declarative prefixes, stay in NFA land as long as they can and (transparently) switch over to procedural land when they have to.
13:19 moritz joined 13:26 jaldhar left
rsimoes1 Is there somewhere in the docs that explain how junctions are different from sets? 13:28
moritz rsimoes1: junctions are basically sets plus a rule to evaluate that set for truthness 13:29
for example any(True, False) evaluates to True, all(True, False) evaluates to False 13:30
rsimoes1 truthness = set membership/absense/etc?
13:30 panterax__ left
moritz rsimoes1: no; evaulating the whole set in boolean context 13:30
rsimoes1 oh, okay 13:31
moritz the purpose of junctions is always to give you a boolean answer in the end
masak well, and to distribute dispatch.
moritz you ask if $value == any('yes', 'no', 'y', n') { ... }
masak: that's a means to get that boolean answer, not the purpose 13:32
rsimoes1 hm
masak moritz: yes, just realized that :)
moritz: that's the means to the end.
moritz rsimoes1: if you want to test set membership, you should really be using a proper set, not a junction
rsimoes1 maybe that's just a simple case, but it seems like I'm just doing "$value ∈ any('yes', 'no', 'y', n')" 13:33
masak rsimoes1: people often want junctions to be sets, and expect to get subsets from junctions by manipulating them somehow. this is counter to the intent of junctions.
rsimoes1: it's not always about set membership.
rsimoes1 okay
masak rsimoes1: think about all(@a) > all(@b), for example.
moritz if you ask $answer ~~ none(/expletive1/, /expletive2/), that's not all a set membership test 13:34
13:35 jupp1 joined
masak sub prime($n) { none(2..sqrt $n) %% $n } 13:35
13:35 jupp left
kshannon The current S05 is littered with the idea of ratcheted atoms participating in LTM. 13:36
masak I guess that one can be formulated as set membership :)
but I don't think of it that way.
moritz $n %% none(2..sqrt(%n) please
masak oh right. :/
I always get that one in the wrong order...
I even stopped and thought about it this time. :/
13:37 panterax joined
masak nom: sub prime($n) { $n %% none 2..sqrt $n }; .say for grep &prime, 2..100 13:37
p6eval nom 38165a: OUTPUT«2␤3␤5␤7␤11␤13␤17␤19␤23␤29␤31␤37␤41␤43␤47␤53␤59␤61␤67␤71␤73␤79␤83␤89␤97␤»
masak \o/ 13:38
should probably'a named it "is-prime" :)
rsimoes1 you can express "all(@a) > all(@b)" with set notation and quantifiers
I see it might get more complicated, though 13:39
masak sure.
moritz rsimoes1: sure you can, but the fact remains that the primitives by which junctions work are not the same as the set primitives
masak rsimoes1: I use junctions sometimes in my Perl 6 code, but much *less* than I thought I would five years ago. 13:40
moritz all(@a) > all(@b) in terms of set memebership tests and quantors is simply FORALL a IN @a FORALL b IN @B: a > b
masak rsimoes1: I use them in "static" situations, such as if statements or loop conditions.
rsimoes1: I don't pass them around a lot at all. 13:41
moritz thinks "how are junctions and sets related" would make a worthwhile FAQ entry
masak indeed.
rsimoes1: also note that junctions DWIM with negated infix operators, in a way that set objects don't do at all. 13:42
rsimoes1: the spec has some wording on that. I don't dare explain it, because I don't have a good mental model of it :)
moritz basically the spec says that $a !foo $b should behave as !($a foo $b) under autothreading 13:44
rsimoes1 oh awesome
masak oh, right.
rsimoes1: here's the kind of expectation people have on junctions: rt.perl.org/rt3/Ticket/Display.html?id=61676 13:45
rsimoes1 I popped a blood vessel trying to figure out what was going on with $foo !~~ @bar in perl 5
I can see how junctions only allow for "sets" that are trivially decidable, too 13:46
masak rsimoes1: we used to think smartmatching against arrays meant any() semantics on the array. we don't anymore. but you probably know this.
moritz rsimoes1: (p5) well, junctions are rather broken in p5
masak smartmatching is rather broken in p5 :) 13:47
moritz erm, yes, that's what I meant
sorry
rsimoes1 it's gotten better each major release since 5.10
masak glad to hear it.
moritz but it's still fundamentally flawed
rsimoes1 yeah, I agree
moritz smart matching needs user-exposed types to DWIM in any predictable way 13:48
and p5 doesn't expose core types to the user
rsimoes1 I used $ ~~ @ smart matching in a cpan module that required v5.10
but I release-tested it with v5.14
and then got all sorts of interesting smoke failure reports
moritz ah, I read the "I love CPAN testers" blog post :-) 13:49
rsimoes1 bah, Conway's talk of quantum superpositions seems a bit over-the-top
moritz there's really nothing quantum in superpositions 13:50
masak I've been studying quantum computing a little bit, and I'll say this. junctions are *not* like quantum superpositions.
neither is TheDamian's CPAN module.
moritz quantum is... much weirder 13:51
rsimoes1 probably just wanted to add some flair a la popular science magazines
gets wider circulation that way :D
moritz aye...
dalek ecza: 614790f | coke++ | t/spectest.data:
Run more tests.
masak probably.
"OMG it's on and off at the same time!" 13:53
moritz I thought more of "LOL I MAKED YOU A QUANTUM!" :-) 13:54
rsimoes1 "DUDE, this cat's, like, nine kinds of alive and dead!"
moritz but I still find it quite amusing and ingenious
masak nom: class Button { has Bool $.on }; my $b = one Button.new(:on), Button.new(:!on); if $b { say "it's on" }; if !$b { say "it's off" } 13:55
p6eval nom 38165a: OUTPUT«it's off␤»
masak dang :)
13:55 mkramer joined
masak ...but expected. 13:55
nom: class Button { has Bool $.on }; my $b = any Button.new(:on), Button.new(:!on); if $b { say "it's on" }; if !$b { say "it's off" }
p6eval nom 38165a: OUTPUT«it's on␤»
masak I can't think of a case where a junction can be its own boolean negation. 13:56
because it always boolifies to *something*, either True or False.
moritz well, you can ask it to boolify in different ways
[Coke] perl6: eval "%ENV"
p6eval rakudo 38165a: OUTPUT«===SORRY!===␤Variable %ENV is not predeclared at line 1, near ""␤»
..pugs b927740: ( no output )
..niecza v13-207-g0ab28e3: OUTPUT«Unhandled exception: Variable %ENV is not predeclared␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 5675 (STD.sorry @ 4) ␤ at /home/p6eval/niecza/src/STD.pm6 line 5435 (ANON @ 34) ␤ at /home…
masak [Coke]: %*ENV 13:57
moritz if $j { ... }; if !$j { ... }
[Coke] masak: S02-magicals/env.t
masak moritz: that's what I did above.
moritz or even if $j == True { ... } # urks
masak yuck.
[Coke] explicitly tests that line; and expects it to eval OK, but to set $!. Trying to figure out if it should die instead. 13:58
13:58 LlamaRider joined
moritz [Coke]: that's old eval semantics 13:58
13:58 mtk left
moritz [Coke]: might as well use eval_dies_ok '%ENV'; 13:58
masak also, what's the point of testing for the absence of a variable?
13:59 mtk joined
[Coke] moritz: done. 13:59
tadzik so eval does not catch exceptions these days, eh?
moritz tadzik: correct
masak: well, there's an %ENV in GLOBAL or PROCESS or whatever it's called
masak: so if some compiler writer accidentally installs that as a setting, that test catches it 14:00
masak fair enough. 14:01
moritz roast is full of weird tests; but many are weird for a reason 14:02
you wouldn't believe how much the early compilers got wrong...
masak: oh wait, you wrote November, you would know :-)
TimToady LlamaRider: according to spec, the fact that rakudo turns { $_ => 2*$_ } into a hash, is a bug; see S04:1590, end of paragraph 14:03
well, the fact isn't a bug...
moritz is that distinction meant to be syntactic? 14:04
TimToady perl6: say { $_ => 2*$_ }.WHAT
p6eval niecza v13-207-g0ab28e3: OUTPUT«Use of uninitialized value in numeric context␤ at /home/p6eval/niecza/lib/CORE.setting line 961 (warn @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 215 (Any.Numeric @ 6) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /tmp/bgA66mxh8d line 0 (mainli…
..pugs b927740: OUTPUT«pugs: Missing required parameters: $_␤»
..rakudo 38165a: OUTPUT«use of uninitialized variable $_ of type Any in numeric context␤use of uninitialized variable $!key of type Any in string context␤Hash()␤»
dalek ast: cbcc367 | coke++ | S02-magicals/env.t:
fudge for niecza, update oldstyle eval test
14:06
TimToady all closures should know if they have parameters semantically, though we treat the $_ parameter specially so it can be omitted
perl6: my $c = { $_ => 2*$_ }; say $c.WHAT
p6eval pugs b927740: OUTPUT«pugs: Missing required parameters: $_␤»
..niecza v13-207-g0ab28e3: OUTPUT«Use of uninitialized value in numeric context␤ at /home/p6eval/niecza/lib/CORE.setting line 961 (warn @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 215 (Any.Numeric @ 6) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /tmp/1cBQk64y3m line 0 (mainli…
..rakudo 38165a: OUTPUT«use of uninitialized variable $_ of type Any in numeric context␤use of uninitialized variable $!key of type Any in string context␤Hash()␤»
dalek ecza: 9b38fb8 | coke++ | t/spectest.data:
run S02-magicals/env.t
14:07
LlamaRider I guess that part of the spec is yet to receive more attention.
phenny LlamaRider: 08:49Z <moritz> tell LlamaRider re pair in a block, you can use a semicolon to disambiguate a block with a pair from a hash literal: @a.map: {; $_ => 2 * $_ } # fewer parentheses for the win
moritz iirc pmichaud++ pointed out several problems with that piece of spec 14:08
14:08 mkramer left, alvis left
masak oh? I'm interested to hear what those problems are. 14:08
LlamaRider nice, moritz++ great syntax there, although the semicolon looks a little bit werd :) but I can get used to that 14:09
masak I've had the feeling that if Rakudo only conforms to the the spec there, all will be well.
14:09 mkramer joined
masak LlamaRider: I also don't like the semicolon there. :( 14:09
LlamaRider: but it's temporary, until Rakudo gets its act together.
moritz masak: they are in logs somewhere... but not easy to search for, I fear
LlamaRider rakudo: my @a=(1,2); say @a.map: { $_ => 2 * $_ ;;} 14:10
p6eval rakudo 38165a: OUTPUT«1 2 2 4␤»
LlamaRider there, it's prettier :)
masak weird output.
dalek ast: d5f4f03 | coke++ | S02-magicals/env.t:
unfudge for rakudo
masak rakudo: my @a=(1,2); say @a.map({ $_ => 2 * $_ ;;}).perl
p6eval rakudo 38165a: OUTPUT«(1 => 2, 2 => 4).list␤» 14:11
moritz nom: my @a = 1, 2; say (@a Z=> (@a X* 2)).perl
p6eval nom 38165a: OUTPUT«(1 => 2, 2 => 4).list␤»
LlamaRider oO what sorcery is thiz? Z? lots to learn xD
TimToady it's just a zip 14:12
or a zipwith, in this case
masak nom: my @a = 1..5; my @b = 'a' .. 'e'; .say for @a Z @b
p6eval nom 38165a: OUTPUT«1␤a␤2␤b␤3␤c␤4␤d␤5␤e␤»
masak LlamaRider: there you go, that's what happens. 14:13
moritz take one element from each list, connect them with =>. Rinse and repeat
masak LlamaRider: Z takes an element from each list, and connects them with a comma.
LlamaRider interesting combinator
TimToady zip as in combine values like a zipper
masak LlamaRider: Z=> does the same with =>
14:13 mkramer left
masak nom: my @a = 1..5; my @b = 100, 200 ... 500; .say for @a Z+ @b 14:13
moritz hey, we should start zcombinator.com and xcombinator.com and have them both point to perl6.org :-)
p6eval nom 38165a: OUTPUT«101␤202␤303␤404␤505␤»
masak moritz: :P 14:14
14:14 mkramer joined
LlamaRider 1. I am amazed declaring @b like this works... what are the limits of inferring sequences? 14:15
2. I understand Z now, thanks masak++ moritz++ TimToady++
14:15 mkramer left 14:16 mkramer joined
moritz LlamaRider: just arithmetic and geometric sequences are recognized 14:16
14:16 skids joined
moritz LlamaRider: if you need something more fancy, you can provide a custom generator 14:16
masak has anyone done that yet?
moritz nom: say (1, 2, 4 ... 128)
p6eval nom 38165a: OUTPUT«1 2 4 8 16 32 64 128␤»
moritz masak: done what? custom generators?
masak yes.
moritz sure 14:17
masak I completely missed that.
is there a blog post somewhere?
moritz nom: say (1, 5, { $^a + 2 * $^b } ... * > 100 )
p6eval nom 38165a: OUTPUT«1 5 11 27 65 157␤»
LlamaRider wow.
moritz nom: say (1, 1, { $^a + $^b } ...^ * > 100) 14:18
p6eval nom 38165a: OUTPUT«1 1 2 3 5 8 13 21 34 55 89␤»
dalek ast: 04db5dc | coke++ | S05-match/perl.t:
fudge for niecza
benabik nom: say (1,1, * + * …^ * > 100) # extra starry
p6eval nom 38165a: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2␤»
dalek ecza: 5e077dc | coke++ | t/spectest.data:
run (heavily fudged) S05-match/perl.t
14:18 kaleem joined
TimToady LlamaRider: sequence operators are described at S03:1787 14:18
benabik nom: say (1,1, * + * ...^ * > 100) # extra starry 14:19
p6eval nom 38165a: OUTPUT«1 1 2 3 5 8 13 21 34 55 89␤»
masak moritz: sorry, I misunderstood you.
moritz nom: say (1, 1, &[+] ... * > 100) # extra un-starry :-)
p6eval nom 38165a: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144␤»
LlamaRider is now thinking if one can solve t3 of p6cc in such a one-liner
masak moritz: I was thinking about adding a multi somehow to modify the intrinsic behaviour of infix:<...> so that it recognized more than artith and geom sequences.
moritz masak: ah 14:20
masak: no, that hasn't been done to the best of my knowledge
benabik moritz++
moritz maybe we should spec a dispatch to a SEQUENCE_INFER subroutine that gets a sequence and returns a closure that continues the sequence 14:21
and ... could use that under the hood
masak nom: my &plus := &[+}; say (1, 1, &plus ... * > 100)
p6eval nom 38165a: OUTPUT«===SORRY!===␤Unable to parse variable, couldn't find final ']' at line 2␤»
masak nom: my &plus := &[+]; say (1, 1, &plus ... * > 100)
p6eval nom 38165a: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144␤»
masak \o/
moritz then you could add that without having to bother with the actual sequence generation (which can be a PITA)
benabik Add a multi that queries oeis.org for the sequence. 14:22
TimToady that way lies madness, probably better just to have an OEIS module
masak moritz: hm, I was thinking making SEQUENCE_INFER a set of multis (with arith and geom being provided through the setting)
moritz: but maybe it's better to handle it with wrapping and nextsame?
moritz masak: not sure; MMD isn't really suitable for sequence recognition 14:23
14:23 alvis joined
TimToady sequence recognition is terribly ambiguous, and should not go much past what it already does 14:24
moritz TimToady: I know, but it's tempting
TimToady yes, and many of us have been tempted in the past, and pulled back 14:25
moritz I always have the feeling that there's a nice, simple and powerful sequence recognizer around the corner
masak :)
moritz something that calculates differences and quotients of two numbers, and auto-correlates that with the original sequence (possibly shifted) 14:26
and then recurses
masak yanks moritz back hard
:P
TimToady search oeis for a sequence you think it should recognize, and then see how many hits you get :)
moritz that should catch arithmetic, geometric, fib, and many combinations thereof
TimToady: been there, done that 14:27
it's still itching, but I'm not tempted to bring it into p6 core
TimToady the only one I've seriously considered adding is 2,3,5...*
but @primes is shorter and more informative 14:28
moritz because it's nontrivial to implement in a fast way?
14:28 jupp1 left
masak +1 for @primes in the setting. 14:28
but I'm also curious which implementation it'd use under the hood.
14:29 tokuhirom joined
moritz @first_1000_primes_hardcoded, grep &rabin_miller, $lower, *+2 ... * 14:30
masak or maybe we leave @primes out of the setting because (1) there is no trivial, fast implementation of it, (2) implementing something like that is like implementing postfix:<!>, something people enjoy.
14:30 replore left
moritz masak: convincing 14:30
masak moritz: a... probabilistic algorithm in the setting? :) 14:31
"works most of the time!"
arnsholt I'd be in favour of a probabilistic algorithm in the setting
14:31 x3nU left
arnsholt If nothing else, just to argue that Monte Carlo methods actually are useful 14:31
masak aye. I'm just being a bigot. :) 14:32
arnsholt The number of iterations to do can be controlled with a dynvar or optional argument, for those that want that
I know =)
moritz "works most of the time" is a pretty good description of most perl 6 compilers out there :-)
14:33 sayu joined
skids wondering why crippling Buf seems so popular 14:33
moritz crippling? in what way?
skids Well, for example, casting Buf to Str should be possible.
IMO.
masak it *is* possible. it's called .decode 14:34
TimToady niecza: constant @primes = 2, 3, -> $n is copy { repeat { $n += 2 } until $n %% none @primes ... * > sqrt $n; $n; } ... *; say @primes[^20]
p6eval niecza v13-207-g0ab28e3: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Niecza.Kernel.IterFlatten (Niecza.VarDeque inq) [0x00000] in <filename unknown>:0 ␤ at Run.CORE.C504Iterator.flat (Niecza.Frame ) [0x00000] in <…
dalek ast: 94faae3 | coke++ | S16-io/say.t:
awkwardly fudge for niecza
moritz what masak++ said
dalek ecza: 09d9cda | coke++ | t/spectest.data:
run fudged S16-io/say.t
skids No, I mean just coercing. If you have to do everything with Buf through special interfaces, it makes it incompatible with many other constructs.
arnsholt skids: Enforcing a distinction between "sequence of bytes" and "sequence of characters" is a very concious choice 14:35
And a good one, IMO
moritz skids: that was one of the lessons from p5
masak skids: everything you've said so far indicates you're not appreciating the distinction arnsholt just mentioned.
skids Well, to be proper, Buf isn't a sequence of bytes exactly.
masak to a first approximation, it is.
14:35 birdwindupbird left
moritz mixing bytes and characters is a sure way to make you cry 14:35
masak skids: perhaps strangelyconsistent.org/blog/str-an...get-it-now will help. 14:36
moritz Buf8 is a sequence of bytes; I think it should be the default in a lot of places that now spec Buf
for example IO.read sould really return Buf8, not Buf
and rakudo's Buf is actually a Buf8
arnsholt Joel Spolsky's bare minimum Unicode post was on HN earlier today, always good reading as well 14:37
moritz in p5 there are always modules that don't document if they return and/or expect bytes or characters 14:38
masak I'm not sure why we bother with distinctions like Buf8. I'd be happy with Buf being a byte buffer, and everything else being provided through libraries.
moritz masak: me too
masak we have a tendency to overgeneralize sometimes. this seems to be one of those cases.
moritz makes masak++ his spec slimming king 14:39
skids I have no problem with enforcing distinctions, but that doesn't mean walling the construct off from interacting with other things.
tadzik I just implemented isa as a method in C++. I need vacation
arnsholt masak: Or Buf8 and Buf-int
moritz skids: is requiring a .decode really "walling off"? 14:40
dalek ast: 9f4b11f | coke++ | S32-list/create.t:
fudge for niecza
arnsholt But maybe Buf-int is just as well handled as a special case handling for Array[int]
TimToady Bufs are required to be compact arrays
dalek ecza: 270a262 | coke++ | t/spectest.data:
run (fudged) S32-list/create.t
colomon [Coke]++ 14:41
moritz skids: p5 shows that making Buf and Str interchangable is a really bad idea. Where would you draw the line that neither mixes up the two, nor walls off?
arnsholt Right. So Buf-int might be a good idea then
skids Well, my current point of frustration is really that ~~ doesn't like to work with Buf directly. 14:42
moritz skids: ~~, or regexes? 14:43
dalek ast: a1b034a | coke++ | integration/advent2009-day22.t:
fudge for niecza
skids regexes
14:43 kmwallio joined
TimToady and what should it do if it sees a high bit? 14:43
dalek ecza: 22efcfd | coke++ | t/spectest.data:
run fudged integration/advent2009-day22.t
moritz skids: well, what would Buf.new(1 ... 256) ~~ m:g/\w/ do?
moritz TimToady: and what should it do if it sees a low bit? :-) 14:44
[Coke] colomon: just some LHF. maybe 30 passes for all that. ;)
though the L is getting higher and higher. :P
colomon [Coke]: nothing at all wrong with LHF
skids moritz: complain that m:bytes wasn't specified, for one, assuming buf8. 14:45
[Coke] hey, rakudo: I gave you one more passing test. ;) 14:46
moritz skids: and if m:bytes was specified (assuming that such a modifier makes sense), what semantics would \w have?
14:46 Trashlord left 14:47 snearch joined
moritz what would Buf.new(1..255) ~~ m:bytes/a/ do? 14:47
skids Those constructs that make sense should be sensibly mapped, I would think. Those that don't should fail based on incompatibility. But all of the regex engine shouldn't be off limits.
14:47 snearch left, nornagest joined 14:48 snearch joined
moritz skids: my point is that "those that make sense" is much smaller than you might think 14:48
masak skids: we're trying to conservatively make the distinction really sharp, and then evolve towards mulddling it up where it doesn't hurt us. thus, all proposals for muddlings are welcome, but heavily scrutinized.
TimToady we look at 'em hard too
14:48 nornagest left
moritz skids: with :bytes, . and quantifiers make sense. But what else? 14:48
m:bytes/a/ doesn't make sense, because a is a character, not a byte
TimToady the buf might be ascii, or it might not 14:49
moritz well, if it's ascii, decode it as ASCII
skids m:bytes/ \x[42 43 13]/ for one.
moritz if you want latin-1 semantics, decode it as latin-1
skids: iirc \x is also specced to mean characters, not bytes
14:50 mkramer left
skids Really, I don't want any character semantics at all, the data I'm working with is binary. 14:50
arnsholt But regexes don't really work with bytes
moritz skids: I'm not really experienced with binary data, but I'd think that unpack would be much more useful than regexes for binary data, no?
skids Noarnsholt: they indeed do, and very well. 14:51
masak I'm with arnsholt here. everything I've seen about regexes is in terms of chars, not byts.
bytes*
skids: do you simply avoid things like \w and \s and \d ?
skids moritz: personally I'm of the opinion that unpack should die in favor of regex constructs.
masak skids: not to mention character classes and Unicode properties.
skids more like do not use them, rather than avoid them. 14:52
moritz masak: and characters themselves
masak skids: what's left? I'm not even sure C<.> is defined!
moritz well, under the hypthetical :bytes, . would be defined to match one byte
arnsholt No, unpack definitely serves a purpose. Things like integer decoding of different kinds of byte-order and such are definitely not trivially implementable with regexes
skids masak: code blocks (when they work) and .ast (when that works)
masak skids: what do you mean when you say to arnsholt that regexes work well with binary data? :)
arnsholt I'm not convinced regexes are a good match for fixed-with data at all, really 14:53
skids masak: subpattern matching, taking that result and feeding it back into a new expression, all more flexible than unpack.
arnsholt: binary != fixed-width
For example, TLVs
arnsholt That's true. But most of the use-case of unpack is for fixed-width 14:54
TimToady I actually kinda with skids here, if you consider regex as finite automata
there are many uses for those down in the bytes world
arnsholt Yeah, it's true that some kind of generalization into bytes would be nice 14:55
moritz aye, but I don't think that p6 regexes are well suited to be just magically applied to Bufs
TimToady skids isn't talking about magic, but about sufficiently advance technology :) 14:56
arnsholt Yeah, I don't see a good way to use straight regexes on bytes
skids (and grammars are much prettier and more flexiblle than sequences of unpack statements)
TimToady hardware folks do it all the time
moritz one way you can always take is decode the Buf as Latin-1, and then take care yourself not to apply character semantics where you don't mean to 14:57
masak I also want to use my grammars for parsing binary data if that's possible. I simply don't see how to do it yet. how do I specify what bytes I want to match if all regexes specify is characters? 14:58
TimToady you change the definition of "character", obviously :)
benabik "Any technology distinguishable from magic is insufficiently advanced."
moritz TimToady: and I think that's the very approach that got p5 deep into trouble
15:00 nornagest joined
Util masak , moritz : t4-description =~ s/(If there is) (possible solution)/$1 no $2/ ; 15:00
skids masak: \xe8 is pretty unambiguously a byte containing the (unsigned) value 232. Though now that you make me think of it, buf8 doesn't really indicate signedness. Might be room for growth there.
arnsholt It might be conjectured that m:bytes// actually entails a severe restriction of allowed regex syntax?
TimToady arnsholt: yes, and it's even specced at S05:4479 15:01
arnsholt Allowing only ., \xdeadbeef and friends, and ranges of same at a first approximation
TimToady: Aha =)
moritz plus captures and quantifiers
arnsholt Yah, obviously
benabik I think bufs are explicitly unsigned. Determining signedness involves figuring out an encoding. (Although via unpack, not via decode.)
arnsholt (It just turns out that my browser search function is completely broken. Bah.) 15:02
masak Util: thanks -- I'm disinclined to change the descriptions after releasing them, but maybe I'll make a note in NOTES.
Util masak: great, thanks! 15:03
skids
.oO(from the perspective of a low level programmer, it is pretty funny that the word "endianness" appears only once in the synopsis)
15:05 groky joined, koban left
TimToady and that paragraph is rather suspect in confusing characters with codepoints... 15:07
and looks like an end-run around .encode
masak Util: updated. strangelyconsistent.org/p6cc2011/NOTES
15:07 jupp joined
masak Util++ # discovering and reporting 15:08
15:09 groky left, hanekomu left
[Coke] kind of wishes the contest was in a git repo so I could clone it. ;) 15:11
moritz [Coke]: it is... but it's not public, because it also contains our solutions and notes :-) 15:12
[Coke]: but we could make a copy of the public part and it put it into a repo, for your convenience
[Coke] ok, that could be problematic. ;)
moritz: eh. I already have a repo. maybe next year. ;) 15:13
masak next year we'll probably go the githib repo route, yes.
github*
moritz maybe together with the winner of this year's contest
masak that would be nice :)
I'm really glad I have moritz along this year. the contest has scaled almost exactly 2x since last year. 15:14
moritz I think I've learned that 1) I'm not too well suited for managing the contest and 2) that I envy the contestants
masak :P
what makes you say (1)?
I understand (2) compeltely. 15:15
moritz and 3) although I've never done it alone, I'm pretty sure it's important to have somebody to talk to (about the tasks to chose etc.)
TimToady he only has half as much experience as you :)
moritz masak: well, all the interesting task ideas were yours
masak yeah, full ACK on (3). I actually need several people to talk to.
[Coke] niecza: say 18159 / 18587 #not finished yet.
p6eval niecza v13-207-g0ab28e3: OUTPUT«0.97697315327917367␤» 15:16
skids arnsholt: BTW, endianness (and alignment thereof) as you pointed out is one of the more challenging aspects of regex on binary data, especially when it flips midstream e.g. you have a network-order area embedded in a host-order structure. However, that is not much prettier to do with unpack than with a suitably well defined grammar.
masak moritz: they were only mine until I mentioned them to you. :) you definitely helped improve them. 15:17
15:19 molaf left
moritz I have two more thoughts on regex/grammars for binary data 15:19
1) we might have an :encoding adverb that lets you use character literals to match bytes 15:20
ie if you write m:bytes:encoding<ASCII>/'AB'/, you mean the bytes 0x41, 0x42 15:21
[Coke] rakudo: sub postfix:<!>($n) { [*] 1..$n }; say (1, 2, 3)>>!
p6eval rakudo 38165a: OUTPUT«1 2 6␤»
[Coke] rakudo: sub postfix:<!>($n) { [*] 1..$n }; say (1, 2, 3)>>!
p6eval rakudo 38165a: OUTPUT«1 2 6␤»
[Coke] argh.
rakudo: sub infix:<+++>($a, $b) { ($a + $b) div 2 }; say 10 >>+++<< 14
15:21 PacoAir joined
p6eval rakudo 38165a: OUTPUT«===SORRY!===␤Missing << or >> at line 1, near "++<< 14"␤» 15:21
moritz 2) I guess for many binary formats it would make sense to extract an integer out of a capture, and use the result as a quantifier 15:22
masak looks like an LTM issue.
std: sub infix:<+++>($a, $b) { ($a + $b) div 2 }; say 10 >>+++<< 14
p6eval std dc62e1d: OUTPUT«ok 00:01 114m␤»
masak [Coke]: is that an RT ticket already?
colomon niecza: sub infix:<+++>($a, $b) { ($a + $b) div 2 }; say 10 >>+++<< 14
p6eval niecza v13-207-g0ab28e3: OUTPUT«12␤»
moritz failing test at least, iirc 15:23
masak moritz: for many binary formats it makes sense to talk about ASCII literals, too.
moritz that's why I proposed :encoding<ASCII> to allow that
:-)
TimToady that's why it's default
moritz and that's where I disagree 15:24
[Coke] rakudo: my @a = 1; for 1..10 { my $last = @a[*-1]; say $last; push @a, (sub ($s) { $s + 1 })($last) }; say @a.perl
p6eval rakudo 38165a: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤Array.new(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)␤»
[Coke] masak: yes.
TimToady moritz: our job is not always to protect the user
moritz TimToady: no, only where we learned that it's necessary (see also: p5) 15:25
15:25 jupp1 joined 15:26 jupp left
[Coke] rakudo: try { warn "foo"; say "alive" } 15:26
p6eval rakudo 38165a: OUTPUT«foo␤alive␤»
moritz [Coke]: that one only works by cheating
TimToady moritz: p6 is very far from giving the user the kind of rope that p5 does 15:27
mls moritz: what cheating?
moritz (rakudo doesn't throw an exception as it should, it merely writes to $*ERR)
TimToady you're basically going for a slippery slop argument here
moritz mls: warn
TimToady *slope
mls moritz: no, I changed that. It uses a control exception (like it should)
masak moritz: shouldn't &warn abort the try block there? isn't that why we invented CONTROL?
TimToady but I would like Perl 6 to be useful in addition to being safe
moritz TimToady: I just think we have different ideas how steep our slopes are 15:28
mls masak: try doesn't catch control exceptions
masak oh!
moritz mls: oh cool
I missed that part
masak but wait. 'warn' isn't a control exception, it's a CATCH exception.
no?
15:28 tokuhirom left
TimToady warn is control 15:29
mls rakudo: warn("hi") ; CONTROL { default { say "cauight" }}
p6eval rakudo 38165a: OUTPUT«cauight␤»
moritz mls++
[Coke] rakudo: my @a := 1; say @a ~~ Positional
p6eval rakudo 38165a: OUTPUT«Type check failed in binding␤ in block <anon> at /tmp/FTvvrgwEwx:1␤ in <anon> at /tmp/FTvvrgwEwx:1␤»
TimToady S04:1198
moritz [Coke]: I hope I closed that one 15:30
masak ah, ok.
[Coke] moritz: you didn't. email on its way.
moritz [Coke]: aw crap. I remember writing a test for it... 15:31
or unfudging one
15:31 kshannon joined
[Coke] rakudo: { say $^x } if 1; 15:31
p6eval rakudo 38165a: ( no output )
[Coke] rakudo: if 1 -> $x { say $x } 15:32
p6eval rakudo 38165a: OUTPUT«1␤»
15:34 wtw left
masak rakudo: if 1 { say $^x } 15:35
p6eval rakudo 38165a: OUTPUT«1␤»
masak rakudo: -> $x { say $x } if 1
p6eval rakudo 38165a: ( no output )
masak rakudo: -> $x { say $x } for 1..5
p6eval rakudo 38165a: OUTPUT«1␤2␤3␤4␤5␤»
[Coke] $ cat A/B.pm
class A::B {}
2;0 coke@feather:~/sandbox/rakudo$ ./perl6 -e 'use A::B; class A {}; say "alive"'
alive
ACK. Sorry.
masak TimToady: why does the 'for' form work but not the 'if' form? 15:36
[Coke] rakudo: use MONKEY_TYPING; augment class Any { method invoke {1} }; .()
p6eval rakudo 38165a: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Any'␤ in <anon> at src/gen/Metamodel.pm:3368␤ in block <anon> at /tmp/lFGNk09Kyt:1␤ in <anon> at /tmp/lFGNk09Kyt:1␤»
[Coke] rakudo: use MONKEY_TYPING; augment class Any { method postcircumfix:<( )>($c) { 1 } }; .() 15:37
p6eval rakudo 38165a: ( no output )
[Coke] rakudo: use MONKEY_TYPING; augment class Any { method postcircumfix:<( )>($c) { 1 } }; .().say
p6eval rakudo 38165a: OUTPUT«1␤»
15:38 wolfman2000 left
[Coke] # 01/11/2012 - niecza at 97.69% 15:38
TimToady masak: it would probably break list comprehensions
masak how? 15:39
[Coke] niecza: say 18587-18159 # almost there.
p6eval niecza v13-207-g0ab28e3: OUTPUT«428␤»
masak oh well, it's not that important. it just seemed like a discontinuity to me.
cognominal_ nom: say Bool.parents 15:40
p6eval nom 38165a: OUTPUT«Method 'parents' not found for invocant of class 'Bool'␤ in block <anon> at /tmp/wMdbZijFHP:1␤ in <anon> at /tmp/wMdbZijFHP:1␤»
cognominal_ nom: say Bool.^parents
p6eval nom 38165a: OUTPUT«␤»
[Coke] rakudo: say 685-83 # almost down to 600 tickets if you squint.
p6eval rakudo 38165a: OUTPUT«602␤»
cognominal_ nom: say Int.^parents
p6eval nom 38165a: OUTPUT«Real() Numeric()␤»
masak 600 tickets! wow.
[Coke] rakudo: say for 1..3 15:41
p6eval rakudo 38165a: OUTPUT«␤␤␤»
TimToady std: say for 1..3 15:42
p6eval std dc62e1d: 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/9MTlNIkg_n line 1:␤------> say⏏ for 1..3␤Check failed␤FAILED 00:01 109m␤»
masak TimToady: long-standing parsing bug in nom. 15:43
b: say for 1..3
p6eval b 1b7dd1: OUTPUT«␤␤␤»
masak alpha: say for 1..3
p6eval alpha : OUTPUT«say requires an argument at line 10, near "for 1..3"␤in Main (file src/gen_setting.pm, line 2610)␤»
[Coke] rakudo: rakudo: say :a<> 15:44
p6eval rakudo 38165a: OUTPUT«===SORRY!===␤Confused at line 1, near "rakudo: sa"␤»
[Coke] rakudo: say :a<>
p6eval rakudo 38165a: OUTPUT«===SORRY!===␤Unsupported use of <>; in Perl 6 please use lines() to read input, ('') to represent a null string or () to represent an empty list at line 1, near "<>"␤»
[Coke] rakudo: say 1%^^1 15:45
p6eval rakudo 38165a: OUTPUT«0␤»
[Coke] rakudo: my $b = &time; say &$b(); 15:46
p6eval rakudo 38165a: OUTPUT«===SORRY!===␤Symbol '&time' not predeclared in <anonymous> (/tmp/rmvYisn_Ne:1)␤»
[Coke] std: my $b = &time; say &$b();
p6eval std dc62e1d: OUTPUT«ok 00:01 114m␤»
masak niecza: AGAIN: say "OH HAI"; goto AGAIN
p6eval niecza v13-207-g0ab28e3: OUTPUT«(timeout)OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤O…
masak niecza: say "A"; goto FOO; say "B"; if 42 { say "C"; FOO: say "D" }; say "E" 15:47
p6eval niecza v13-207-g0ab28e3: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'FOO' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1143 (P6.comp_unit @ 32) ␤ at /home/p6…
masak niecza: say "A"; goto "FOO"; say "B"; if 42 { say "C"; FOO: say "D" }; say "E"
p6eval niecza v13-207-g0ab28e3: OUTPUT«A␤Unhandled exception: Illegal control operator: goto(FOO, dynamic)␤ at /home/p6eval/niecza/lib/CORE.setting line 1120 (_lexotic @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1122 (goto @ 3) ␤ at /tmp/CjwJZAF1Z2 line 1 (mainline @ 3) ␤ at /home/…
[Coke] rakudo: use Test; eval_lives_ok '1<&1'
15:47 alester joined
p6eval rakudo 38165a: OUTPUT«use of uninitialized value of type Nil in numeric context␤ok 1 - ␤» 15:47
masak sorear: "Illegal control operator"?
15:50 pmurias joined
pmurias sorear: ping 15:50
[Coke] rakudo: break
p6eval rakudo 38165a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&break' called (line 1)␤»
[Coke] rakudo: succeed 15:51
p6eval rakudo 38165a: OUTPUT«succeed without when clause␤ in block <anon> at /tmp/bkp6JWCw3l:1␤ in <anon> at /tmp/bkp6JWCw3l:1␤»
masak are 'succeed' keywords specific to 'when' clauses? I think not.
TimToady masak: niecza does not implement goto as specced in S04:1220, which makes it problematic for use to skip into a different 'when' condition 15:52
masak a 'given' could 'succeed' outside of a 'when' clause, no?
rakudo: given 42 { when 5 {}; succeed; when 42 { say "OH NOES" } }
p6eval rakudo 38165a: ( no output )
[Coke] rakudo: "foo" ~~ / foo {make "foo"} /; say "What kind of $()l am I?"
p6eval rakudo 38165a: OUTPUT«Cannot bind attributes in a type object␤ in sub make at src/gen/CORE.setting:7190␤ in block <anon> at /tmp/aQlAtwqe7P:1␤ in regex <anon> at /tmp/aQlAtwqe7P:1␤ in method ACCEPTS at src/gen/CORE.setting:7260␤ in block <anon> at /tmp/aQlAtwqe7P:1␤ in <anon> at /…
mls masak: feel free to fix the error message ;) 15:53
TimToady succeed escapes the current 'when' and then looks for a topicalizer block
masak mls: at $dayjob right now. maybe later tonight.
[Coke] rakudo: sub foo ( $f = rand ) { say $f; }; say Capture.new() ~~ &foo.signature;
p6eval rakudo 38165a: OUTPUT«Bool::False␤»
masak TimToady: oh, so the 'when' is necessary? 15:54
TimToady S04:931
[Coke] rakudo: sub foo ( $f = 0.132412414 ) { say $f; }; say Capture.new() ~~ &foo.signature;
p6eval rakudo 38165a: OUTPUT«Bool::False␤»
benabik nom: sub foo ( $f = rand ) { say $f }; say &foo.signature.perl
p6eval nom 38165a: OUTPUT«:(Any $f?)␤»
[Coke] rakudo: sub foo ( $f = substr('string',0) ) { say $f; }; say Capture.new() ~~ &foo.signature;
p6eval rakudo 38165a: OUTPUT«Bool::False␤»
benabik nom: sub foo ( $f = rand ) { say $f }; say &foo.signature.WHAT 15:55
p6eval nom 38165a: OUTPUT«Signature()␤»
[Coke] benabik: RT#77164. If you can reject it, we are at 600. ;) 15:56
nom: say 18597*.98-18159 #for colomon 15:57
p6eval nom 38165a: OUTPUT«66.06␤»
colomon oh, man, so tempting....
masak I wonder what I got that Easter estimate from... 16:00
benabik [Coke]: Well, as you note, rejecting all of them is probably not desired... 16:01
nom: say :().^methods 16:02
p6eval nom 38165a: OUTPUT«Method 'gist' not found for invocant of class 'Sub'␤ in method gist at src/gen/CORE.setting:4005␤ in sub say at src/gen/CORE.setting:5734␤ in block <anon> at /tmp/ro5P3TYaeg:1␤ in <anon> at /tmp/ro5P3TYaeg:1␤»
benabik is always displeased when the REPL dies.
colomon #phasers in 148 min?
benabik Am I doing something wrong, or is that a bug ^^ 16:05
colomon nom: say :().^methods>>.name
p6eval nom 38165a: OUTPUT«(signal SEGV)»
colomon ye-ha! 16:06
benabik nom: say 1.^methods
p6eval nom 38165a: OUTPUT«Int Num Rat abs Bridge chr succ pred sqrt base floor round ceiling WHICH perl Bool Str Rat abs sign conjugate sqrt sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh floor ceili…
16:06 sayu left
colomon niecza: my @a = 1, 2, 3; my @b = 4, 1, 1313; say @a »min« @b 16:06
p6eval niecza v13-207-g0ab28e3: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 806 (warn @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 170 (Mu.Str @ 9) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/src/ST…
colomon sorear: ^^
benabik [Coke]: I think the problem with Capture.new() ~~ &foo.signature is that Signature doesn't have an ACCEPTS 16:07
colomon niecza: my @a = 1, 2, 3; say @a >>~>> ', '; 16:09
p6eval niecza v13-207-g0ab28e3: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 806 (warn @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 170 (Mu.Str @ 9) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/src/ST…
masak nom: say ().^methods>>.name 16:10
p6eval nom 38165a: OUTPUT«Parcel Capture flat item list lol at_pos postcircumfix:<[ ]> STORE FLATTENABLE_LIST FLATTENABLE_HASH fmt of Bool Numeric Str ACCEPTS gist perl DUMP␤»
masak nom: say (:()).^methods>>.name
p6eval nom 38165a: OUTPUT«(signal SEGV)»
masak nom: say (:()).^name
p6eval nom 38165a: OUTPUT«Signature␤»
Woodi hallo, maybe someone have new idea which can be put into security synopsis ? taint mode, data flow ?
dalek ast: 1fd6098 | (Solomon Foster)++ | integration/advent2009-day05.t:
Fudge for niecza.
16:11
ecza: 6f9dbe9 | (Solomon Foster)++ | t/spectest.data:
Turn on integration/advent2009-day05.t.
16:12
colomon [Coke]: there's 15 of the 67
16:12 cognominal joined
[Coke] colomon: \o/ 16:14
16:15 cognominal_ left
dalek ecs: 1945a6b | util++ | S32-setting-library/Containers.pod:
[S32/Containers] fixed typo in negative .rotate
16:19
16:22 jferrero left, mkramer joined, mkramer left 16:23 jferrero joined
dalek ast: 4363cc3 | (Solomon Foster)++ | S05-grammar/inheritance.t:
Fudge for niecza.
16:28
ast: 134127c | (Solomon Foster)++ | S05-grammar/inheritance.t:
Add tests so that we're actually testing inheritance on the current versions of Rakudo and Niecza.
ecza: 9d69852 | (Solomon Foster)++ | t/spectest.data:
Turn on S05-grammar/inheritance.t.
colomon [Coke]: There's another 18. Now it's time for a whistle lesson. 16:29
[Coke] halfway there!
16:31 cooper left 16:32 cooper joined 16:34 kaleem left 16:35 mkramer joined, kaleem joined 16:36 mkramer left 16:39 cognominal_ joined
TimToady kshannon, moritz: re ratchet vs DFA, I don't see a problem, since the regex itself serves as the check to see if it matches with ratcheting, and fails over to a different solution if the DFA was too optimistic 16:39
no need for a postprocess pass; it's already there :)
and by DFA I also mean parallel NFA :) 16:40
16:42 cognominal left
masak can't say I grok it but it sounds like what I thought would be the case. 16:43
16:43 colomon joined 16:44 nornagest left
masak decommutes 16:48
TimToady moritz: if you're still wondering about irclog.perlgeek.de/perl6/2012-01-11#i_4968234, I'd suggest thinking about whether the truncated string includes the name :) 16:51
17:02 donri left
kshannon TimToady: Duh! Silly me... 17:03
17:06 donri joined 17:08 cooper left
moritz TimToady: hm, I'm not used to backtracking DFAs, so I'm not sure (how) that works 17:08
17:08 MayDaniel joined
kshannon The DFA doesn't backtrack. 17:09
But if one of the LTM it ends up using doesn't really match because of the ratcheting, then it will fail during the procdural pass. 17:10
moritz that doesn't quite reassure me (more) 17:11
suppose you have
17:11 cooper joined
moritz token word { \w+ }; 'abc' ~~ /<word><word>/ 17:11
when transformed to a DFA, the first <word> will match 'ab', and the second <word> matches 'c' 17:12
TimToady then it will fail in the grammar, as it should
moritz ah, so each DFA match always require a re-parse?
TimToady yes 17:13
moritz that's the part I was missing
kshannon It already has to do that to make sure that zero-width assertions match properly.
TimToady even with fates, they only influence alteration choices, not normal matching 17:14
*alternation
17:15 jupp1 left
kshannon It may be able to optimize the re-parse somewhat, using info (like fates) from the [DN]FA run, but it has to be careful to make sure all the original semantics still hold. 17:16
TimToady nodnod 17:17
for parsing the typical computer language, however, it's not that much faster to skip N chars than to match N chars that are already probably in the cache 17:18
other parsing problems may show greater benefit from such an optimization though
17:19 snearch left
kshannon I think tomorrow I'm going to write some tests to stress test these corner cases... 17:19
17:19 snearch joined
sorear good * #perl6 17:22
kshannon TimToady: irclog.perlgeek.de/perl6/2012-01-11#i_4968552 - Do you think that's really the right semantics for ||
sorear moritz: No, Rakudo has a shorter version number, so p6eval cut off less of its output 17:25
moritz sorear: yes, I've seen that too (after TimToady++'s hint)
TimToady kshannon: are you asking about C or about B2? 17:30
kshannon C
cognominal_ nom: sub a { callframe }; a 17:31
p6eval nom 38165a: ( no output )
kshannon B2 not being in LTM makes sense.
cognominal_ nom: sub a { callframe }; say a
p6eval nom 38165a: OUTPUT«Method 'perl' not found for invocant of class 'CallContext'␤ in method reify at src/gen/CORE.setting:4380␤ in method reify at src/gen/CORE.setting:4285␤ in method reify at src/gen/CORE.setting:4285␤ in method gimme at src/gen/CORE.setting:4649␤ in method eager at…
kshannon I was actually suprised at B1 being part of LTM as well, but I'm willing to accept that.
TimToady if || is mostly used to express failure (and that's the case in STD), then it makes some sense to include C, but I could argue that the || is procedural, so should stop there
17:32 jupp joined
TimToady I don't actually recall which way STD did/does that; perhaps sorear++ knows 17:33
sorear: something broke, maybe in constant folding: 17:34
niecza: constant @primes = 2, 3, -> $p { ($p+2, $p+4 ... -> $n { $n %% none @primes ... * >= sqrt $n })[*-1] } ... *; say @primes[^20];
p6eval niecza v13-207-g0ab28e3: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Niecza.Kernel.IterFlatten (Niecza.VarDeque inq) [0x00000] in <filename unknown>:0 ␤ at Run.CORE.C504Iterator.flat (Niecza.Frame ) [0x00000] in <…
moritz #phasers time
TimToady btw, ^^ is a completely FP prime finder
kshannon Hmmm, so it gets transformed into the equivalent of A [ B1 C | ] for LTM, and then if the B1 C doesn't match, A does and it falls into the B2 arm.
TimToady you shouldn't rely on my memory when I have the flu... 17:35
kshannon s/match, A does/match, but A does/
:)
TimToady this should not be taken to imply that you should rely on my memory when I *don't* have the flue... :) 17:36
or the flu...
kshannon I can sorta see the reasoning. I'll have to re-read some of the grammars and think about it more.
TimToady these decisions tend to go off into pragmatics rather than theory...
though sometimes it comes down to "If we make it this way, then it's possible to express both ideas, but if we make it that way, we can't..." 17:37
kshannon Which this falls under I guess. adding a sequence point before the temporal alternation gives the semantics I was imagining. 17:38
TimToady there's also the consideration (depending on how smart your NFA is) that recombining tails of alternations can result in combinatorial explosions of states
which tends to argue against Cish decisions 17:39
but including B1 is important for the ||-as-error use case, I think 17:40
anyway, that seems to work out best so far 17:42
kshannon The interesting thing is my intuition had the || and && not contributing to LTM at all, and the non-greedy quiantifiers contributing as much as they could (i.e. if the minimum repetitions was > 0)
17:43 cognominal_ left, JimmyZ joined, cognominal_ joined
kshannon And then I was re-reading S05 and found them the other way around. 17:43
17:43 mls_ joined 17:45 wolfman2000 joined 17:46 jupp left, Chillance joined 17:49 thou joined 17:50 spine_ left
sorear pmurias: pong 17:51
17:53 molaf joined, nornagest joined, daxim left 17:54 dakkar left 17:56 mj41 left 17:59 mj41 joined, kaleem left
LlamaRider perl6: my &s = sub ($a,*@a) { say $a; say @a; exit }; 1,2,3, &s ... 5; 18:03
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "5"␤ expecting operator␤ at /tmp/wtkBEiaNKG line 1, column 62␤»
..rakudo 38165a, niecza v13-207-g0ab28e3: ( no output )
LlamaRider oO 18:04
rakudo: my &s = sub ($a,*@a) { say $a; say @a; exit }; 1,2,3, &s ... 5;
p6eval rakudo 38165a: ( no output )
LlamaRider again different output on my local machine, I get a lonely "3" printed.
in any case - slurpy arguments don't work with sequence subs?
or am I missing something
18:04 Trashlord joined 18:06 mj41 left 18:10 LlamaRider left 18:12 LlamaRider joined 18:13 xinming left 18:18 GlitchMr joined
moritz LlamaRider: a lazy list in void context doesn't have any reason to generate more elements 18:18
LlamaRider: if you run the code in your REPL, it'll try to generate enough elements to print the sequence though 18:19
which is probably why you see the lone 3
LlamaRider aha!
18:19 jupp joined
LlamaRider how do I get my hands on the entire list then? 18:19
18:19 thou left
moritz not at all, if you exit() in the generator :-) 18:20
LlamaRider :-)
i want the current subsequence accessible inside the generator
(justs for the heck of trying to get something similar to t3 in a one-liner)
and I see it there 18:21
sorear EOBACKLOG
LlamaRider if I ask for $^x, $^y, $^z i see 3,2,1
moritz nom: eager 1, 2, 3, -> *@a { say @a.perl; 4 } ... 4;
p6eval nom 38165a: OUTPUT«Array.new()␤»
moritz doesn't seem to be working with slurpies yet :-) 18:22
erm, s/)/(/
LlamaRider nom: eager 1, 2, 3, -> *@a { say @a; 4 } ... 4;
p6eval nom 38165a: OUTPUT«␤»
18:22 xinming joined
LlamaRider I see 18:22
so then it's impossible :-( 18:23
moritz nom: my @a := 1, 2, 3, { say @a; 4 } .. 4; @a.eager 18:24
p6eval nom 38165a: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(\$v, Mu *%_)␤␤ in method Numeric at src/gen/CORE.setting:646␤ in sub infix:<==> at src/gen/CORE.setting:2240␤ in sub infix:<cmp> at src/gen/CORE.setting:1186␤ in method reify …
moritz meh :(
nom: my @a := 1, 2, 3, { say @a; 4 } ... 4; @a.eager
p6eval nom 38165a: OUTPUT«␤splice() not implemented in class 'Mu'␤ in method reify at src/gen/CORE.setting:4285␤ in method gimme at src/gen/CORE.setting:4649␤ in method eager at src/gen/CORE.setting:4624␤ in block <anon> at /tmp/vwsBl4bPJM:1␤ in <anon> at /tmp/vwsBl4bPJM:1␤»
moritz meh :((
LlamaRider: no, seems to be broken right now :(
LlamaRider any introspection backdoor ? 18:25
that i ask for the parcel of the current sub?
or smth
s/parcel/capture/ 18:26
colomon nom: eager 1, 2, 3, -> @a { say @a; 4 } ... 4; 18:31
p6eval nom 38165a: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Int instead␤ in block <anon> at /tmp/Ftl0_1W9S9:1␤ in sub coro at src/gen/CORE.setting:4527␤ in method reify at src/gen/CORE.setting:4502␤ in method reify at src/gen/CORE.setting:4285␤ in m…
colomon nom: eager 1, 2, 3, -> *@a { say @a; 4 } ... 4;
p6eval nom 38165a: OUTPUT«␤»
colomon nieacza: eager 1, 2, 3, -> *@a { say @a; 4 } ... 4;
niecza: eager 1, 2, 3, -> *@a { say @a; 4 } ... 4;
p6eval niecza v13-207-g0ab28e3: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'eager' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1143 (P6.comp_unit @ 32) ␤ at /ho…
colomon niecza: say 1, 2, 3, -> *@a { say @a; 4 } ... 4; 18:32
p6eval niecza v13-207-g0ab28e3: OUTPUT«1 2 3␤1 2 3 4␤»
sorear colomon: How do you reproduce the Test::Util failure?
LlamaRider WOW
18:32 spine joined
LlamaRider go niecza! :) 18:32
colomon sorear: give me a moment to reproduce, I rebooted before skyping this morning.
LlamaRider btw, is it considered bad use of resources if I open a private chat with p6eval and try to make a niecza one-liner? :) 18:34
colomon sorear: prove --verbose -e t/fudgeandrun t/spec/S32-scalar/undef.t
[Coke] private chats with p6eval are probably a good thing. 18:35
geekosaur would think golfing is a really good reason to use a private chat
[Coke] (says the guy who send about 100 public messages to it this morning.)
sorear colomon: I golfed your failure earlier to just '1»~«1' 18:36
colomon though public chats have the benefit of kibitzing.
LlamaRider I'll share the results ;)
colomon sorear: sorry for not trying to golf it more, I was trying to sneak in a couple of quick spectest adds before my lesson. :) 18:37
moritz LlamaRider: (private p6eval chat) feel free 18:38
LlamaRider (do they timeout on infinite loops? *guilty look*)
moritz sure
[Coke] nom: loop {} 18:39
moritz otherwise I'd be restarting that thing 5 to 20 times a day :-)
p6eval nom 38165a: OUTPUT«(timeout)»
moritz is too lazy for that
18:40 kaleem joined
[Coke] nom: "30".print 18:40
p6eval nom 38165a: OUTPUT«30»
[Coke] niecza: "30".print
p6eval niecza v13-207-g0ab28e3: OUTPUT«Unhandled exception: Unable to resolve method print in class Str␤ at /tmp/tT0kWiYS7w line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2988 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2989 (module-CORE @ 59) ␤ at /home…
18:41 jupp left 18:42 kaleem left
colomon sorear: to get the Niecza.Serialization.ThawException: dated sources exception, I had to delete change line 7 of Test::Util.pm to 18:42
proto sub is_run(|$) is export { * } 18:43
(ie lose the (:DEFAULT))
[Coke] # 01/11/2012 - niecza at 97.88% 18:44
b: say 18587-18193 ; say 18597*.98-18193 18:45
p6eval b 1b7dd1: OUTPUT«394␤32.06␤»
LlamaRider "Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1]"
kudos to whoever decided to turn the error messages into a textbook for P6 :)
[Coke] Aye.
LlamaRider done. I give you the non-deterministic, non-minimal, addition chain construction one-liner (~ t3 for p6cc): 18:47
niecza: my $n=11; say 1, 2, -> *@a { my $next=$n+1; $next = @a.pick+@a.pick while ($next>$n || $next <= @a[*-1]) ; $next;} ... $n;
p6eval niecza v13-207-g0ab28e3: OUTPUT«1 2 3 4 6 7 11␤»
LlamaRider (though I agree it's almost illegible :D) 18:48
18:48 thou joined
moritz likes it :-) 18:49
LlamaRider I am sure one can estimate the times you need to run the line to be "almost sure" you found a minimal chain 18:50
[Coke] tries to ignore that send. :P 18:51
LlamaRider it's very tempting, since it's a one-liner :D 18:53
18:53 JimmyZ left
LlamaRider moritz: do you know if there are "slurpy arguments in sequence subs" tests in the P6 test suite? I would vote for adding one if not (seems like one of those things one might forget to think about) 18:55
dalek ecza: 2aab48f | sorear++ | lib/Kernel.cs:
Add missing case to list circularity checker for TimToady
18:56
sorear TimToady's latest generator needs to be primed with 2, 3, 5, 7 to work 18:57
colomon: and then what? run a test file that uses it? 18:58
colomon prove --verbose -e t/fudgeandrun t/spec/S32-scalar/undef.t
is the particular command line I've been using to trigger it
sorear has not much clue what's going on with 1»~«1 18:59
19:01 LlamaRider left 19:02 LlamaRider joined
TimToady niecza: constant @primes = 2, 3, -> $p { ($p+2, $p+4 ... -> $n { $n %% none @primes ... * >= sqrt $n })[*-1] } ... *; my @x.plan: @primes; say @x[^20]; 19:06
p6eval niecza v13-207-g0ab28e3: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71␤»
TimToady then why does that work?
sorear: ^^
19:07 xinming left
sorear TimToady: because that version allows $n to vary in the inner loop 19:07
niecza: constant @primes = 2, 3, -> $p { ($p+2, $p+4 ... -> $n { $n %% none @primes ... * >= sqrt $n })[*-1] } ... *; say @primes[^20]; 19:08
p6eval niecza v13-207-g0ab28e3: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Niecza.Kernel.IterFlatten (Niecza.VarDeque inq) [0x00000] in <filename unknown>:0 ␤ at Run.CORE.C504Iterator.flat (Niecza.Frame ) [0x00000] in <…
benabik @x.plan ?
sorear wait, what IS the difference between these?
oh
TimToady thing is, it used to work 19:09
TimToady suspects overagressive constant folding somewhere or other 19:10
*agg
but only because that's one of the things you were just working on...
sorear it used to be that if you tried to iterate past the reified end of a list recursively, the recursive calls would see the list just end 19:11
now it errors
I suspect this is it
the old behavior, while inconsistant, helped the primers
TimToady: what did you think of the latest specs pull-request? 19:14
TimToady I don't understand what you're asking
sorear github.com/perl6/specs/pull/10 19:17
19:17 xinming joined 19:18 nebuchadnezzar left
dalek ecza: f65c77a | sorear++ | src/ (3 files):
Fix »~«, add NIECZA_STD_DEBUG
19:18
19:20 nebuchadnezzar joined, nebuchadnezzar left 19:22 nebuchadnezzar joined 19:24 birdwindupbird joined
dalek ast: ab6ab0b | (Solomon Foster)++ | S13-overloading/typecasting-long.t:
Fudge for niecza.
19:25
19:27 jupp joined
[Coke] ooh, 12 more. 19:31
colomon slowly but surely. :) 19:32
19:32 LlamaRider left
dalek ecza: 698b0d6 | (Solomon Foster)++ | t/spectest.data:
Turn on S13-overloading/typecasting-long.t.
19:32
[Coke] I need to avoid IRC for a bit. good luck, colomon. :) 19:33
19:34 MayDaniel left
dalek ast: e54f3fa | (Solomon Foster)++ | integration/advent2009-day05.t:
Unfudge tests that work now in niecza, sorear++.
19:35
sorear nom: class A { method postcircumfix:<( )>($x) { say $x.perl } }; A(5) 19:36
p6eval nom 38165a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&A' called (line 1)␤»
sorear nom: class A { method postcircumfix:<( )>($x) { say $x.perl } }; (A.new)(5) 19:37
p6eval nom 38165a: OUTPUT«Capture.new()␤»
sorear bleh
why?
I need to talk to jnthn on this
I think it makes vastly more sense for postcircumfix:<( )> to simply receive the arguments 19:38
benabik If you want a capture, there's syntax for it already.
colomon +1
19:42 jupp1 joined, jupp left 19:43 kmwallio left 19:44 arlinius left
TimToady niecza: say 2,3 ... * >= sqrt 5 19:47
p6eval niecza v13-216-g2aab48f: OUTPUT«2 3␤»
TimToady sorear: I'm not sure I'm buying the notion that you're running into the end of @primes
3 is already reified, and the inner loop terminates on it 19:48
sorear niecza: 2, 3, gather { die } ... * >= sqrt 5
p6eval niecza v13-216-g2aab48f: ( no output )
sorear niecza: say 2, 3, gather { die } ... * >= sqrt 5
p6eval niecza v13-216-g2aab48f: OUTPUT«2 3␤»
sorear niecza: constant @primes = 2, 3, -> $p { ($p+2, $p+4 ... -> $n { $n %% none @primes ... * >= sqrt $n })[*-1] } ... *; say @primes[^20]; 19:49
p6eval niecza v13-216-g2aab48f: OUTPUT«Unhandled exception: Circular data dependency in list iteration, or last fetch threw exception␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (Iterator.flat @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1201 (Parcel.flat @ 4) ␤ at /home/p6eval/n…
sorear niecza: constant @primes = 2, 3, -> $p { ($p+2, $p+4 ... -> $n { $n %% none @primes ... * >= sqrt $n })[*-1] } ... *; .say for @primes;
p6eval niecza v13-216-g2aab48f: OUTPUT«(timeout)2␤3␤5␤7␤11␤13␤17␤19␤23␤29␤31␤37␤41␤43␤47␤53␤59␤61␤67␤71␤73␤79␤83␤89␤97␤101␤103␤107␤109␤113␤127␤131␤137␤139␤149␤151␤157␤163␤167␤173␤179␤181␤191␤193␤197␤199␤211␤223␤227␤229␤233␤239␤241␤251␤257␤263␤269␤271␤277␤281␤283␤293␤307␤311␤313␤317␤331␤337␤347…
TimToady it's more like it's trying to reify out of order maybe
sorear niecza: constant @primes = 2, 3, -> $p { ($p+2, $p+4 ... -> $n { $n %% none @primes ... * >= sqrt $n })[*-1] } ... *; for ^20 { say @primes[$_] } 19:50
p6eval niecza v13-216-g2aab48f: OUTPUT«2␤3␤Unhandled exception: Circular data dependency in list iteration, or last fetch threw exception␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (Iterator.flat @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1201 (Parcel.flat @ 4) ␤ at /home/p6ev…
sorear niecza: constant @primes = 2, 3, gather { die }; my $p = 3; say ($p+2, $p+4 ... -> $n { $n %% none @primes ... * >= sqrt $n })[*-1]
p6eval niecza v13-216-g2aab48f: OUTPUT«5␤»
sorear I suspect some lag is being introduced by the sequence operator 19:51
I thought I fixed that, but maybe there's other lag. 19:52
niecza: say (2, 3, gather { die } ... *)[1]
p6eval niecza v13-216-g2aab48f: OUTPUT«3␤»
sorear doesn't really get what's going on here, either 19:53
19:53 thou left
TimToady blames Hofstadter's Law 19:53
19:55 thou joined
dalek ast: 3e8f57b | (Solomon Foster)++ | S06-multi/proto.t:
Fudge for niecza.
19:57
ecza: d461515 | (Solomon Foster)++ | t/spectest.data:
Turn on S06-multi/proto.t.
19:58 Trashlord left, wolfman2000 left
TimToady It's just a good thing he formulated it in that order, or it would have come out: Even when you take into account Hofstadter's Law, even when you take into account Hofstadter's Law, even when you take into account Hofstadter's Law... 20:00
dalek ast: 0f9c6e3 | (Solomon Foster)++ | S06-currying/mixed.t:
Fudge for niecza.
20:02
ecza: 0e6968c | (Solomon Foster)++ | t/spectest.data:
Turned on S06-currying/mixed.t.
20:02 nebuchadnezzar left
colomon niecza: say 8, */2 ... *-* < 2 20:06
p6eval niecza v13-216-g2aab48f: OUTPUT«8 4 2 1␤»
colomon niecza: say 8, */2 ... abs(*-*) < 2
p6eval niecza v13-216-g2aab48f: OUTPUT«Unhandled exception: Cannot use value like WhateverCode as a number␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 214 (Any.Numeric @ 5) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.s…
sorear abs isn't syntactically an operator, so it doesn't whatever-crry 20:08
niecza: say 8, */2 ... (*-*).abs < 2
p6eval niecza v13-216-g2aab48f: OUTPUT«8 4 2 1␤»
GlitchMr ... 20:09
I still think who would make code like "say 8, */2 ... (*-*).abs < 2"...
Perl 6 is more confusing than Perl 5... 20:10
20:10 nebuchadnezzar joined
sorear colomon: the problem is the conflict between packages/Test.pm and niecza's native Test.pm 20:11
colomon: the 'use Test' in Test::Util is resolved to the native Test.pm, because each module has its own @*INC 20:12
masak GlitchMr: definitely.
GlitchMr: I also prefer its capacities to Perl 5.
GlitchMr Some parts are nice... but some look like GolfScript...
20:12 bluescreen10 left
sorear Didn't Perl 5 *invent* Gold? 20:13
f
20:13 BinGOs joined
geekosaur arguably that was apl 20:13
GlitchMr for me that was java 20:14
But seriously. Regular expressions were made popular by Perl, but wasn't made by it.
weren't* 20:15
TimToady Regexen aren't really bad...they're just drawn that way...
GlitchMr But yeah, I can agree with APL...
x[⍋x←6?40] 20:16
really?
really...
20:16 Trashlord joined
GlitchMr This picks 6 non-repeating numbers from the range 1-40... 20:16
This... is... golf :P.
tadzik GlitchMr: no one forces you to write like this 20:17
you can write obfuscated code in C too. What's the point?
GlitchMr Weird characters...
I don't know...
TimToady x[ ⍋ x ← 6 ? 40 ] fixed it for ya
tadzik whatever that means 20:18
cognominal_ rakudo people may find this patch interesting : controlling backtrace with env var RAKUDO_BACKTRACE gist.github.com/1596551
20:18 arlinius joined
GlitchMr en.wikipedia.org/wiki/APL_(codepage) 20:18
I guess that Perl 6 will need separate keyboard soon... :P 20:19
TimToady only if you're into set theory
GlitchMr There is only « for now (it's good that it can be replaced with <<, but still)... 20:20
What will happen in Perl 7... if it will exist...
TimToady this is already specced at S01:93 20:21
GlitchMr What is 93?
TimToady line number, but if you visit the irclog, it'll have a link
GlitchMr Line number in POD file?
TimToady which points to perlcabal.org/syn/S01.html#line_93 20:22
20:23 jupp1 left, mj41 joined
cognominal_ notes that 7 is the figure before 8, which is infinity sideways 20:23
TimToady you just need the "TURN SIDEWAYS" modifier :) 20:24
GlitchMr Actually, I think I will return to MOV X, Y coding... it's easier to understand... 20:25
TimToady or if you're in Haskell, use the compareTwoGraphemesAndDoTheSameThingToAnother operator
simple matter of finding the fixed point 20:26
20:27 thou left, kaare_ joined
cognominal_ the mathematician Jean Yves Girard (the guy who designed System F) assimilates infinity to imperfection. 20:27
So 7 is perfection and 8 imperfection if I continue this kabbalist thread. 20:28
TimToady: extra points if you find the fixed point with pointfree programming 20:29
maybe pointless would be appropriate here. 20:30
geekosaur p6 gematria?
20:30 benabik left
TimToady or pointalist... 20:30
20:31 benabik joined
GlitchMr I don't like sigils with dots... it looks weird... 20:31
TimToady *pointillist
benabik Makes cents to me...
masak GlitchMr: you're disgusted because different languages allow you to abbreviate code until it's unreadable. I'm enthralled because so many languages allow me to think in new ways, and express solutions sometimes verbosely, sometimes tersely. 20:32
GlitchMr Maybe that's true...
masak GlitchMr: do you mean the dot twigil, like in @.legs ?
GlitchMr No, I mean $a.print
TimToady I believe it was a pun
GlitchMr I don't know why, but $a->print looks OK for me, a.print looks OK... but $a.print doesn't... it's probably something weird with me... 20:33
masak GlitchMr: some people love that feature. they say "ooh, everything is an object!", and moritz says "auugh!" :P
TimToady maybe it's because you're used to what you're used to...
masak GlitchMr: I think it'll pass. I don't find it strange at all. 20:34
GlitchMr But it's maybe because dot operator is used for sideeffects. Whatever :).
masak huh? :) 20:35
GlitchMr I like ~ operator usage. It looks clever and nice. It's way better that dot in such usage...
20:35 jupp joined
GlitchMr JS doesn't have stuff like [0,1,2].alert() but it has stuff like 2..sin()... 20:35
'abc' ~ 'def' # looks nice 20:36
'abc' . 'def' # looks weird for me...
It doesn't have ambiguity of "+" operator used in various programming languages and it doesn't look weird.
benabik nom: say('abc'.'comb') 20:37
p6eval nom 38165a: OUTPUT«===SORRY!===␤Quoted method name requires parenthesized arguments at line 1, near ")"␤»
masak GlitchMr: there's a guy who, when I meet him at Perl events, complains a lot about the fact that he can't put whitespace between 'foo' and '()' in 'foo()' in Perl 6. there will always be some features of syntax that displease some people. 20:38
GlitchMr Tilde is rarely used in programming languages aside of bitwise NOT, so it's pretty nice :).
masak, it reminds me Ruby and CoffeeScript for some reason :).
But I don't care. It's actually pretty nice. Why you would want to use space in middle of function call... I don't know... 20:39
TimToady we decided NOT was a variant of XOR with 0, so they both use ^ in Perl 6
tadzik masak: I don't like it either, TBH
masak CoffeeScript -- now there's a weird pony. half of the dev world seems to love it, the other half seems to find it completely inane.
GlitchMr I don't like Ruby, but I like CoffeeScript... yeah... I'm weird... 20:40
masak tadzik: I don't *like* it either -- I just dislike the TTIAR rule less.
arnsholt masak: And he doesn't like unspace either, I assume? =)
masak arnsholt: oh, he detests it!
arnsholt: he's insulted I even suggested it (which I do every time).
colomon (*-*) # TIE Bomber operator...
arnsholt You should keep on suggesting it as well =) 20:41
GlitchMr irb(main):005:0> puts ()
(irb):5: warning: don't put space before argument parentheses
masak arnsholt: naturally :)
GlitchMr CoffeeScript makes it syntax error...
And I actually think it's good thing.
masak nom: say(42)+1 say (42)+1 20:42
p6eval nom 38165a: OUTPUT«===SORRY!===␤Confused at line 1, near "say(42)+1 "␤»
masak nom: say(42)+1; say (42)+1
p6eval nom 38165a: OUTPUT«42␤43␤»
masak there's the difference in Perl 6.
GlitchMr I actually think it's good thing in background of stuff from Perl 5 like print (2 + 3), 5
dalek ast: d78ab6f | (Solomon Foster)++ | S03-sequence/limit-arity-2-or-more.t:
Fudge for niecza, add versions of fudged tests that niecza has no problem passing.
masak nom: print (2 + 3), 5
p6eval nom 38165a: OUTPUT«55»
dalek ecza: e411c4a | (Solomon Foster)++ | t/spectest.data:
Turn on S03-sequence/limit-arity-2-or-more.t.
20:43
GlitchMr I'm using following rule when deciding to use () or not... if function gives sideffects don't use it, otherwise use it. 20:44
cognominal_ I note that when I open in gmail the bug I submitted for rakudo nom, google advertises me "typesafe Scala traning"
GlitchMr I personally like this rule
TimToady if a function gives side effects, it's not a function :P
GlitchMr What is "print" from Perl then?
It has side effects of putting stuff to STDOUT or other file handle. 20:45
benabik A subroutine
cognominal_ it is dysfunctional function.
GlitchMr Oh, right... I forgot it has different name in Perl...
TimToady at least it's functional
masak GlitchMr: don't worry -- I call 'em functions too sometimes :) 20:47
GlitchMr In most programming languages I have used it's called function, even if it makes sideeffects... that's weird...
Like... alert("") from JS...
(not like you should use alert() in your programs) 20:48
awwaiid rakudo: my $x = say 5 ; say $x.perl
p6eval rakudo 38165a: OUTPUT«5␤Bool::True␤»
20:48 birdwindupbird left 20:50 ksi joined
cognominal_ worse, js makes "function" a keyword. 20:50
GlitchMr PHP does it too... and... 20:51
geekosaur you just want it to use lambda as the keyword
GlitchMr But yeah, Perl is way better than PHP...
JS is weird... it has anonymous named functions... whatever it means... 20:52
benabik ... Anonymous named function?
tadzik it just means that sub foo {} is just foo = sub { }
GlitchMr var func = function f1() {
More like this
flussence function declarations return themselves
geekosaur so? p5 has my $foo = sub {}, same thing 20:53
20:53 LlamaRider joined
GlitchMr > (function named(arg){if(arg==1)return 1;return named(arg-1)*arg}(3)) 20:54
6
It's more like this
masak ah, cognominal_++ reported that -n is broken. I found that out the other day, but maybe I didn't RT it.
GlitchMr The function name is only seen inside the function.
geekosaur so, hack for recursive anonymous functions 20:55
GlitchMr Something like this
geekosaur tries to imagine p6 using Whatever for that, on top of its other uses, feels brain explode 20:56
benabik GlitchMr: That's just nested functions. Nothing odd there.
GlitchMr Yes, except named() isn't defined outside the function 20:57
20:57 LlamaRider_ joined
flussence perl6: sub x { my $y = sub z { return 5 }; return $y }; my $y = x; say $y.() 20:57
p6eval niecza v13-220-g0e6968c: OUTPUT«Potential difficulties:␤ &z is declared but not used at /tmp/jiUFL5X0o4 line 1:␤------> sub x { my $y = sub z ⏏{ return 5 }; return $y }; my $y = x; sa␤␤5␤»
..rakudo 38165a: OUTPUT«5␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "$y"␤ expecting "=", subroutine parameters, trait, block, context, ":" or "("␤ at /tmp/n4QHDorXcl line 1, column 12␤»
20:57 LlamaRider left 20:58 LlamaRider_ left, LlamaRider joined
flussence nom: sub x { my $y = sub z($i) { return $i > 3 ?? $i !! z($i + 1) }; return $y }; my $y = x; say $y.(1) 20:58
p6eval nom 38165a: OUTPUT«4␤»
flussence nom: sub x { my $y = sub z($i) { return $i > 3 ?? $i !! z($i + 1) }; return $y }; my $y = x; say $y.(1); say z(1)
GlitchMr Except if I would skip parenthesis at end and beginning in this example, it would create named() variable
p6eval nom 38165a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&z' called (line 1)␤»
GlitchMr function named(arg){if(arg==1)return 1;return named(arg-1)*arg}(3)
(function named(arg){if(arg==1)return 1;return named(arg-1)*arg}(3))
are different
TimToady perl6: (anon sub foo ($n) { say $n; foo($n-1) if $n })(5) 20:59
p6eval niecza v13-220-g0e6968c: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'foo' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1143 (P6.comp_unit @ 32) ␤ at /home…
..pugs b927740: OUTPUT«*** ␤ Unexpected "foo"␤ expecting "=", subroutine parameters, trait or block␤ at /tmp/shtUeyefYX line 1, column 11␤»
..rakudo 38165a: OUTPUT«===SORRY!===␤Cannot use 'anon' scope with a sub at line 1, near ")(5)"␤»
GlitchMr First is global function which is instantly activated. Second is named anonymous function which is instantly activated.
21:03 benabik left
flussence nom: ((sub z($i) { return $i > 3 ?? $i !! z($i + 1) }).(1)); say &z.WHAT 21:05
p6eval nom 38165a: OUTPUT«Sub()␤»
flussence nom: {(sub z($i) { return $i > 3 ?? $i !! z($i + 1) }).(1)}; say &z.WHAT
p6eval nom 38165a: OUTPUT«===SORRY!===␤Symbol '&z' not predeclared in <anonymous> (/tmp/vNgH2xLpWW:1)␤»
masak technically, it was declared. you just can't see it in the current scope. :P 21:08
21:08 GlitchMr left
masak g'ah, I really missed #phasers today :/ 21:09
flussence (doesn't nom's parser keep a list of declared things somewhere? maybe that error message could be made nicer...)
masak flussence: it probably could, but one would have to be careful to actually make the more helpful message more helpful :) 21:10
21:11 localhost left 21:13 localhost joined
sorear niecza: (anon sub foo($n) { say $n; &?ROUTINE($n-1) if $n })(5) 21:13
p6eval niecza v13-220-g0e6968c: OUTPUT«5␤4␤3␤2␤1␤0␤»
flussence bah, there's always a better way than the one I come up with :) 21:14
sorear I could make &foo visible inside foo easily enough
GlitchMr would -1 it; does anyone +1? :D
flussence can't see a reason why not, +1 21:16
21:16 skids left
masak the only time it would be a nuisance is when there is already an outer &foo 21:18
sorear how bouts we steal this feature, TimToady?
masak and I don't really have a notion of what would be Least Surprise in this case ;)
flussence hm, S02:2008 should be tweaked to say "names that only exist within that statement" or somesuch
masak but yeah, it seems a cute variant of &?ROUTINE 21:19
arnsholt What does the return value of ~~ s/// indicate? 21:20
On nom, it seems to return true regardless of match or not
21:23 ocharles joined
sorear arnsholt: on niecza - true if match, false if not 21:24
21:27 y3llow left
[Coke] niecza: use Test; is 1, 1|2, "junctive" 21:27
p6eval niecza v13-220-g0e6968c: OUTPUT«not ok 1 - junctive␤# /tmp/dSuOYPCkia line 1␤# Failed test␤# got: 1␤# expected: any(1, 2)␤»
21:28 jupp left 21:29 y3llow joined, pothos joined
dalek ast: 14c5d9a | coke++ | integration/advent2009-day02.t:
fudge for niecza
21:30
ecza: 6972b24 | coke++ | t/spectest.data:
run integration/advent2009-day02.t
masak nom: my $s = "foo"; say $s ~~s/oo/alalalala/
p6eval nom 38165a: OUTPUT«Bool::True␤»
masak nom: my $s = "foo"; say $s ~~s/uu/alalalala/
p6eval nom 38165a: OUTPUT«Bool::True␤»
masak well, that's useless.
21:30 y3llow left
arnsholt sorear: Yeah, that's sort of the behaviour I was expecting =) 21:31
21:31 y3llow joined, LlamaRider left 21:32 pothos left
masak niecza++ 21:32
21:32 pothos joined
arnsholt Hmm. Let's see if I can't figure out how Rakudo does substitution 21:32
21:33 y3llow left, y3llow joined 21:34 leprevost left 21:35 pothos left, snearch left, pothos joined, y3llow left, y3llow joined
arnsholt Heh. I always have to smile when I encounter the wonderful rule name blorst 21:37
21:39 LlamaRider joined, cognominal_ left
masak :) 21:40
sorear blast!
21:41 cognominal joined
masak it was once named "blast", yes. 21:41
sorear still is, no?
STD.pm6 still has it as blast 21:42
LlamaRider rakudo: our $a = 1; say $a; our @b = (1,2); say @b; 21:43
p6eval rakudo 38165a: OUTPUT«1␤Method 'STORE' not found for invocant of class 'Any'␤ in block <anon> at /tmp/sVLCxKGx3m:1␤ in <anon> at /tmp/sVLCxKGx3m:1␤»
spine MAIN(Int n) {
oops
LlamaRider what happened to 'our' and why is it only the case for arrays?
21:44 molaf left
spine MAIN(Int $n) {say $n+1} doesn't work in current rakudo 21:44
sorear spine: that's because command line arguments are strings
spine well, $n.WHAT says Int+{orig-string}()
LlamaRider sorear: wait, what? It has been working for me perfectly fine.
spine The output is 5, so somehow the addition fails 21:45
sorear LlamaRider: ...I didn't reply to you?
spine: oh, strange then. talk to japhb
LlamaRider: I'm confused now
LlamaRider sorear: the MAIN (Int $n) is working well for me 21:46
sorear I have no idea what's up with our in rakudo, but it certainly looks like a bug
21:46 nebuchadnezzar left
arnsholt nom: my $a = "foo"; say($a ~~ s/foo/bar/) 21:46
p6eval nom 38165a: OUTPUT«Bool::True␤» 21:47
21:47 nebuchad` joined
arnsholt nom: my $a = "bar"; say($a ~~ s/foo/bar/) 21:47
p6eval nom 38165a: OUTPUT«Bool::True␤»
21:47 nebuchad` is now known as nebuchadnezzar
sorear Do we have any tests for arnsholt's s/// bug or LlamaRider's our bug? 21:47
ocharles compiles rakudo star for the perl 6 competition
exciting!
sorear o/ ocharles 21:48
masak ocharles: hello! :)
ocharles hi :)
LlamaRider ocharles: happy building :)
sorear how old is your star?
ocharles can't get it to build though
"Failed to load libpcre" during Configure.pl
not sure what's up with that, as I have libpcre installed (I'm on Gentoo)
sorear Do you have libpcre-dev installed? 21:49
spine sorear: thanks will do
masak is it Parrot that needs libpcre?
ocharles I think so
it finally errors saying it can't find parrot_config 21:50
[Coke] parrot can use libpcre, but doesn't require I, I think.
ocharles so I assume --gen-parrot bit is failing. I just did a "make clean" in my parrot dir, maybe that'll help
(I didn't have libpcre installed when I did my first run)
[Coke] ocharles: Do you need star specifically, rather than the latest compiler release?
ocharles I dunno, I just thought star was recommended
sorear star USED to be recommended.
masak star is fine, but latest nom has its merits too. 21:51
sorear but it hasn't been updated in a year and a half.
masak not to mention Niecza :)
ocharles Neicza is .net right?
masak sorear: um. surely there were Star releases in 2010.
sorear right.
masak: this is 2012.
ocharles yea, I'd rather like to avoid having to build mono
masak sorear: um. surely there were Star releases in 2011.
sorear And yet you're fine with having to build parrot.
:)
ocharles sure
smaller than mono :) 21:52
I'll try with nom, maybe that works better..
sorear masak: I wasn't told about them. If anyone has more accurate info on star, that would be nice
masak I wouldn't be surprised if you get the same libpcre error with nom. but it's worth a shot.
sorear star: ;
p6eval star 2011.04: ( no output )
ocharles masak: yea
sorear ok, 8 months. 21:53
ocharles I had star 2011.07
masak ocharles: what's worse, I don't see you among the 35 registered for the Perl 6 Coding Contest...
ocharles masak: I only decided on the train home :)
masak oh :/
ocharles I'll email when I complete the first challenge (which is sketched out on the back of an envelope next to me)
masak the two weeks of registration are up :/
ocharles oh
oh well, might as well solve for fun :) 21:54
masak that's the spirit :)
ocharles though I'll probably just use haskell if I'm only getting solutions :P
sorear hmm, I wonder what caused the setting to regress from 40s to 46s
arnsholt Argh. I think fixing Rakudo will require some rewiring to fix this
masak you're free to send me solutions (in any language) -- I'll be happy to read them.
LlamaRider damn, rakudo started going crazy. Any hints how I can test MAIN through the chat bot? I can declare the sub, but how do I pass it an input parameter? 21:55
sorear MAIN($x)
LlamaRider yes, how do I provide a test value for $x via p6eval
sorear rakudo: sub MAIN($x) { say $x }; MAIN(5) 21:56
p6eval rakudo 38165a: OUTPUT«5␤Usage:␤ --setting=SAFE <x>␤»
LlamaRider duh. lame question. thanks
masak rakudo: sub MAIN($x) { say $x }; MAIN(5); exit
p6eval rakudo 38165a: OUTPUT«5␤»
masak :)
[Coke] sorear: trying to add splice to CORE.setting: how do these lines look:
sub splice(@array, $offset = 0, $size?, *@values) is Niecza::builtin('splice', 1) { @array.splice($offset,$size,@values) }
method splice( @array is rw: Int $offset = 0, Int $size?, *@values ) {
masak 'night, #perl6 21:57
[Coke] hurm. I think I should not have cargo culted the "is builtin"
sorear Is there a .splice in List already? 21:58
arnsholt sorear: Do you happen to remember roughly how niecza does substitution, off hand?
sorear arnsholt: s/x/y/ becomes $_.subst(/x/, 'y', :inplace)
[Coke] sorear: not in CORE.setting, anyway.
LlamaRider sorear: ok, sorry, validated the command line bug for MAIN (Int $n). But I wonder how come it worked when I used it before oO... 21:59
arnsholt Right.
arnsholt goes to dig into Rakudo's Str.pm
sorear [Coke]: that definition of &splice is fine if you remove the builtin 22:00
you'll need to define List.splice, of course
LlamaRider ha, I never did any operations to the value given, just used it for loop bounds. lucky me xD
[Coke] ah, I was adding it to Array - I can move it up one. 22:01
spine well I worked around it with my $m = 0+$n; for the moment
$m is a normal int then, which wirks for any operations 22:02
ocharles fwiw, nom builds fine :)
[Coke] sorear: hurm. why on List and not Array? 22:03
sorear [Coke]: Because List is the supertype
Niecza allows shift/push on List; why not splice? 22:04
or: consistency
[Coke] fair enough. 22:05
22:05 LlamaRider left, LlamaRider joined 22:07 LlamaRider left, LlamaRider joined 22:08 mj41 left
LlamaRider spine: that's a good trick, well played :) 22:08
after the last git pull on rakudo, my perfectly working t2 is now segfaulting for values >3 :((( worst luck ever 22:09
22:16 ksi left
dalek ecza: d330da0 | sorear++ | / (7 files):
Small refactor of source-position handling
22:17
22:28 kaare_ left 22:29 skids joined 22:31 kaare_ joined
LlamaRider can't isolate the segfault, when I remove (seemingly unrelated) patches of code, it allows me to go up to higher input values before crashing. But eventually crashes. Shockingly, if I remove a "say" statement in a loop it's completely gone. 22:33
22:34 molaf joined
LlamaRider anyway, good night. Segfaults are part of life :) 22:35
22:35 LlamaRider left
sorear What would people say if I made 'Any.new' illegal? 22:37
22:40 kaare_ left
PerlJam sorear: that's not very perlish 22:40
22:43 colomon left 22:47 nornagest left 22:49 spine left, panterax left 22:50 panterax joined 22:52 panterax left 22:53 Chillance left, panterax joined 22:59 localhost left 23:00 alester left
sorear tries something very different 23:04
I've split the niecza setting up into 1000-character blocks and timed compilation of each one
&hyper, which falls almost exactly between two block boundaries, accounts for 2 seconds, 4% of compile time, 1% of the file 23:05
23:15 cognominal left
sorear ... 23:16
23:16 cognominal joined
sorear My poor excuse for a profiler has just informed me that the most called function in Niecza (9.8%) is ... 23:16
"ANON"
arnsholt Heh. I'm sure that's a great help =) 23:17
How far down the long tail is the runner-up?
sorear Str.ACCEPTS (3.8%) 23:18
23:20 whiteknight joined
arnsholt Not too bad, I suppose 23:21
But ANON is an aggregate of several lambdas I suppose?
23:21 localhost joined
arnsholt supposes many things 23:21
sorear Right, most likely 23:23
23:23 cognominal left
TimToady that might be yet another use for naming anonymous functions :) 23:24
23:25 cognominal joined
TimToady on having the name visible inside, seems like a win to me, and any sub decl has have set up the symbol table for the formal params by then anyway, so doesn't seem like a hardship 23:25
dalek ecs: 23e517f | larry++ | S02-bits.pod:
allow anon name to be used for recursion
23:32
23:41 PacoAir left
dalek ecs: be88f7f | larry++ | S02-bits.pod:
be more accurate about anon in the table
23:41
23:42 groky joined
sorear aargh this is so frustrating... why is it so slow 23:46
23:48 donri left 23:53 raiph joined 23:55 mtk left