»ö« 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:01 donri joined
soh_cah_toa i forget, how do i perform a negative lookahead assertion? i know for a "character class" it would be <!alpha> but i'm trying to perform a negative lookahead for a newline 00:02
tadzik <!before \n> should be ok 00:03
soh_cah_toa oh, right 'before'
thanks
00:06 replore joined
sorear <![\n]> will be much faster in ŋ, possibly in nom too 00:07
00:07 colomon left
sorear <!before \n> will be slightly faster in niecza 00:07
soh_cah_toa ŋ? what's that? :\
sorear .u ŋ 00:08
phenny U+014B LATIN SMALL LETTER ENG (ŋ)
sorear I'm trying to start a meme here
soh_cah_toa :)
tadzik I like that
jnthn Like I can be bothered to learn to type that :P
Byut, cute :)
tadzik oh, you can just copypaste that every time you need it
I do it with sjohnson's fatface
sorear just compose n g
diakopter what does the meme mean 00:09
flussence altgr+g=ŋ for me
also, whoosh! github.com/flussence/specgraphs/ra.../impls.png
tadzik wzooom 00:10
sorear beta, ng, and beijing are all quite problematic
I guess b would also work for me
soh_cah_toa what's ng?
tadzik the old master
soh_cah_toa ah
why ng? is it an acronym? 00:11
tadzik wasn't that nextgen? 00:12
I dunno
sorear I think it was nextgen originally
soh_cah_toa ok
00:13 risou_awy is now known as risou
jnthn It was a pun on "nextgen" and "new grammar" 00:13
tadzik new grammar, new object model, what'd be next? 00:14
sorear flussence++ # cool. would be even cooler if it could go back to the creation of niecza in Jun10 or thereabouts
tadzik: the next part of rakudo that seriously needs an overhaul is PCT, so I guess ncg (new code generator) 00:15
tadzik: although that might be more of a nqp thing not touching Rakudo proper
tadzik indeed 00:16
supernovus ŋ: say "hello from ng ;-)";
darn ;-)
jnthn sorear: Yeah, that's the plan.
00:17 supernovus left
sorear jnthn: wow, I didn't think I'd be right :-) 00:17
sorear notes that ncg puns as Native Code Generator (used by the GHC people to refer to their new non-C-based backend) 00:18
00:18 donri left, donri joined
sorear well, it was "new" when I was active in '07, they might not consider it new anymore :) 00:19
00:20 tokuhir__ left
soh_cah_toa rakudo: my $foo = "foobar"; $foo ~~ s:g|o|e|; say $foo 00:23
p6eval rakudo 47d772: OUTPUT«===SORRY!===␤Confused at line 1, near "$foo ~~ s:"␤»
soh_cah_toa does 2011.07 not support alternate delimiters in regexes? i keep getting "Unable to parse blockoid, couldn't find final '}'" 00:24
and when i use / instead, it compiles fine
tadzik it may be
soh_cah_toa :(
tadzik rakudo: my $foo = "foobar"; $foo ~~ s:g{o}{e}; say $foo 00:25
p6eval rakudo 47d772: OUTPUT«Could not find sub &s:g{o}␤ in block <anon> at /tmp/HeWgmLqI9k:1␤ in <anon> at /tmp/HeWgmLqI9k:1␤␤»
soh_cah_toa aw man...that means i gotta backslash escape every / in the regex
tadzik just '' them
jnthn b: rx{ / } 00:26
p6eval b 1b7dd1: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 22␤»
00:29 risou is now known as risou_awy
tadzik g'night #perl6 00:32
jnthn 'night
soh_cah_toa \o
sorear rakudo: s :g{o}{e} 00:36
p6eval rakudo 47d772: OUTPUT«Method 'at_key' not found for invocant of class 'Pair'␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:1016␤ in block <anon> at /tmp/yXNrOCi9et:1␤ in <anon> at /tmp/yXNrOCi9et:1␤␤»
sorear er
rakudo: s|o|e|
p6eval rakudo 47d772: OUTPUT«===SORRY!===␤Confused at line 1, near "s|o|e|"␤» 00:37
sorear tadzik: s:g{o}{e} is not valid syntax
std: s:g{o}{e}
p6eval std 8b331d2: OUTPUT«===SORRY!===␤Unsupported use of brackets around replacement; in Perl 6 please use assignment syntax at /tmp/mny7SuVZ6D line 1:␤------> s:g{o}⏏{e}␤Parse failed␤FAILED 00:01 120m␤»
00:45 cooper joined
soh_cah_toa how do i dynamically call subroutines? if that's what you'd called it, i guess. for instance, if i have a package named Foo::Bar with a subroutine called foo(), calling `my $pkg = 'Foo::Bar'; &"$pkg"::foo()` from another package doesn't seem to work 00:45
i haven't had to do that in p6 yet :\
[Coke] sorear: there are huge number of tests that depend on Range stringifying as a list of numbers, it would seem. 00:48
00:48 [particle] left
sorear perl6: say ~(1..6) 00:48
p6eval pugs, rakudo 47d772: OUTPUT«1 2 3 4 5 6␤»
..niecza v10-12-gecd62ba: OUTPUT«1..6␤»
diakopter hm 00:49
makes me think
sorear [Coke]: that may be part of the gist transition that I didn't quite track. I'd like to see what jnthn or TimToady has to say about it
diakopter perl6: say (1..6).perl
p6eval rakudo 47d772, niecza v10-12-gecd62ba: OUTPUT«1..6␤»
..pugs: OUTPUT«(1, 2, 3, 4, 5, 6)␤»
diakopter perl6: print (1..6) 00:50
p6eval niecza v10-12-gecd62ba: OUTPUT«1..6»
..pugs, rakudo 47d772: OUTPUT«123456»
[Coke] aye. (i'd rather see todo fudges working first, will make it easier to go back and fix those either way.
00:50 [particle] joined
sorear niecza: package Foo::Bar { our sub foo() { say "hello" } }; my $pkg = Foo::Bar:: ; say $pkg<&foo>() 00:50
p6eval niecza v10-12-gecd62ba: OUTPUT«hello␤Bool::True␤»
sorear for soh_cah_toa 00:51
soh_cah_toa rakudo: package Foo::Bar { our sub foo() { say "hello" } }; my $pkg = Foo::Bar:: ; say $pkg<&foo>()
p6eval rakudo 47d772: OUTPUT«Method 'at_key' not found for invocant of class 'Any'␤ in find_method at src/gen/Metamodel.pm:143␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:1016␤ in block <anon> at /tmp/iWnWAchJkO:1␤ in <anon> at /tmp/iWnWAchJkO:1␤␤»
sorear niecza: package Foo::Bar { our sub foo() { say "hello" } }; my $pkg = "Foo::Bar" ; say GLOBAL::($pkg)::foo() # alternatively, if you have a string
p6eval niecza v10-12-gecd62ba: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤ at /tmp/Mfyor77x8J line 1 (MAIN mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C1022_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2116 (… 00:52
sorear niecza: package Foo::Bar { our sub foo() { say "hello" } }; my $pkg = "Foo::Bar" ; say &GLOBAL::($pkg)::foo () # alternatively, if you have a string
p6eval niecza v10-12-gecd62ba: OUTPUT«===SORRY!===␤␤Two terms in a row at /tmp/A9WdeXais5 line 1:␤------> = "Foo::Bar" ; say &GLOBAL::($pkg)::foo ⏏() # alternatively, if you have a string␤␤Parse failed␤␤»
sorear niecza: package Foo::Bar { our sub foo() { say "hello" } }; my $pkg = "Foo::Bar" ; say &GLOBAL::($pkg)::foo() # alternatively, if you have a string
p6eval niecza v10-12-gecd62ba: OUTPUT«hello␤Bool::True␤»
soh_cah_toa i'm using 2011.07 though
sorear Why don't you use a class? 00:53
class Foo::Bar { method foo() { ... } }; my $class = Foo::Bar; $class.foo;
soh_cah_toa i'm building a functional interface
it has to determine what package to use based on the os
"Indirect name lookups not yet implemented" 00:56
wonderful :(
dalek kudo/optimizer: 74e8d35 | jnthn++ | src/Perl6/Actions.pm:
Handle natively typed variables in inlinability analysis.
00:57
kudo/optimizer: b4ecf53 | jnthn++ | src/binder/multidispatch.c:
Couple of fixes to native types in multi-dispatch; one in narrowness compuation, another in compile time analysis.
kudo/optimizer: 7d26339 | jnthn++ | src/core/Int.pm:
Stub in first couple of native operators.
kudo/optimizer: 074021d | jnthn++ | src/Perl6/Optimizer.pm:
A crack at enabling inlining in the simple case of chaining operators, though something seems slightly adrift here. At this point, we can now inline the couple of native operators that have been added to the setting. There's various issues, various test regressions, but not crazily many.
diakopter adrift :) 00:58
jnthn what? :)
diakopter amiss?
sorear soh_cah_toa: I've recently become quite fond of the "class as a container for functions" pattern.
jnthn I didn't stay up late enough that I've started imagining words, have I? :)
sorear adrift is a real word. 00:59
jnthn "lacking aim, direction, or stability. "
sorear jnthn: ~(1..6)
jnthn Well, this is most certainly lacking stability :)
00:59 [particle] left
soh_cah_toa well still, i'm building a File::Spec module it it needs to know what package to use depending on $*OS 00:59
diakopter I was merely musing that the usual word to follow "slightly" in such a context is "amiss"
jnthn diakopter: Hmm...doesn't feel as natural. I blame dialect. :) 01:00
nom: ~(1..6)
p6eval nom 47d772: ( no output )
jnthn nom: say ~(1..6)
p6eval nom 47d772: OUTPUT«1 2 3 4 5 6␤»
jnthn sorear: That's what I expect, fwiw.
sorear jnthn: niecza says 1..6
jnthn niecza: say 1..6; say 1...6; 01:01
p6eval niecza v10-12-gecd62ba: OUTPUT«1..6␤1 2 3 4 5 6␤»
sorear which feels more correct to me. I'd like to be persuaded by arguments instead of tests :)
jnthn sorear: I think those two are meant to be consistent.
sorear 1..6 returns a Range object. 1...6 returns a List.
01:01 [particle] joined
jnthn sorear: Suggest arguing with TimToady might be more useful ;) 01:01
sorear jnthn: has TimToady spec'd the correct stringification? 01:02
soh_cah_toa nom: package Foo::Bar { our sub foo() { say "hello" } }; my $pkg = "Foo::Bar" ; say &GLOBAL::($pkg)::foo()
p6eval nom 47d772: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Failure'␤ in <anon> at src/gen/Metamodel.pm:3134␤ in block <anon> at /tmp/h0ql3y4ze4:1␤ in <anon> at /tmp/h0ql3y4ze4:1␤␤»
jnthn sorear: Can't recall a spec ref off hand. OTOH, I've never really been the person working on lists/ranges etc in Rakudo.
soh_cah_toa nom: package Foo::Bar { our sub foo() { say "hello" } }; my $pkg = "Foo::Bar" ; say &::($pkg)::foo()
p6eval nom 47d772: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Failure'␤ in <anon> at src/gen/Metamodel.pm:3134␤ in block <anon> at /tmp/P_Xpzd037M:1␤ in <anon> at /tmp/P_Xpzd037M:1␤␤»
sorear jnthn: is that a pm thing?
jnthn sorear: Yes.
sorear pngs pmichaud 01:03
01:03 packetknife left
diakopter niecza: say list 1..6 01:06
p6eval niecza v10-12-gecd62ba: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'list' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 685 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤ …
diakopter There is a "list" operator which imposes a list context on its arguments even if list itself occurs in a item context. <-- S02... is this right? 01:07
jnthn 3am...guess that means sleep
Plan for tomorrow: clean up the mess I've made while implementing inlining, and hack on other nom stuff :) 01:08
'ngiht
*night
diakopter o
01:18 benabik joined
soh_cah_toa does anyone know of a good blog/article explaing submethods? i usually see BUILD or DESTROY submethods 01:20
benabik AFAIK, submethods are methods that aren't inheritied. 01:21
01:21 packetknife joined
soh_cah_toa what about BUILD methods, though? when are those invoked? what's special about them? 01:23
benabik BUILD is called as part of new? 01:26
arnsholt BUILD is called by the default .new method
moritz has a blog post about it somewhere I think
benabik I think new defaults to self.bless(*); self.BUILD;
soh_cah_toa before or after new()?
benabik Although I don't know what bless is these days.
soh_cah_toa: inside 01:27
arnsholt perlgeek.de/blog-en/perl-6/object-c...ation.html for example
01:27 [particle] left
soh_cah_toa great, thanks 01:28
01:30 [particle] joined, alester joined 01:31 toebu left
benabik Does :$!var, in general, alter attributes? Or is that special to BUILD? 01:31
(in a sig, referencing the blog post) 01:32
01:32 toebu joined 01:37 whiteknight left 01:42 soh_cah_toa left 01:45 wolfman2000 joined 01:51 [particle] left 01:54 [particle] joined 01:56 molaf joined, packetknife left
sorear benabik: in general. However it is never used except with BUILD. 02:12
who will take Martin Kealey on p6l? 02:17
02:21 woosley joined
dalek ecza/serialize: 1e4b501 | sorear++ | / (3 files):
Simplify marshalling for metaobject references
02:29
02:39 colomon joined, uasi joined 02:41 uasi left
[Coke] need to see if the rakudo tool for reporting on # of skipped/todo'd tests works on niecza. 02:44
how many tests did trig get us up to? 02:55
dalek ecza: 031dc9f | sorear++ | lib/Test.pm6:
Implement todo()
03:13
ecza: 12c9283 | sorear++ | FETCH_URL:
Update bootstrap version
03:15 ponbiki joined
[Coke] All tests successful. 03:16
Files=275, Tests=7907, 743 wallclock secs ( 2.67 usr 1.66 sys + 1220.96 cusr 59.34 csys = 1284.63 CPU)
Result: PASS
(niecza)
sorear: (todo) ah, nifty. I can start converting the tests now. 03:17
dalek ast: d0e149b | Coke++ | S0 (29 files):
niecza fudging
ast: 5d6e74b | Coke++ | S05-metasyntax/litvar.t:
Fix test plan.
ecza: 406bfa2 | Coke++ | t/spectest.data:
run fudged tests.
03:18
sorear yay 03:23
Coke++
03:23 [particle] left 03:33 vlixes` joined 03:34 cognominal left, cognominal joined, vlixes left
[Coke] sorear: do you mind if I allow todos with no reason? 03:34
(then I can allow "?#niecza todo" which is really all the information I have at this point.) 03:35
03:39 odoacre joined 03:42 molaf left
[Coke] (done) 03:43
03:43 kaleem joined
[Coke] (rerunning spec test with todos...) 03:44
sorear [Coke]: go ahead 03:51
03:57 packetknife joined 03:58 WhyteGurl23 joined
sorear WhyteGurl23: are you interested in Perl 6? 03:58
03:58 satyavvd joined 04:01 WhyteGurl23 left 04:07 mberends joined
dalek ecza: ac814f7 | Coke++ | lib/Test.pm6:
escape "#" in TAP test descriptions
04:10
ecza: 8fdba33 | Coke++ | lib/Test.pm6:
Allow bare todos.
ast: 4bdf17e | Coke++ | S0 (59 files):
Convert niecza faux-todo to real todo.
04:11
04:11 envi_ joined 04:16 flussence left 04:18 [particle] joined
sorear wow you're on a roll. Coke++ 04:27
o/ mberends 04:28
mberends o/ sorear, [Coke]-on-a-roll! 04:29
sorear mberends: I was wondering today what the most useful behavior of serialization+CLR-interop would be 04:30
wait, I think I just gave myself an idea
mberends sorear: I'd not noticed your fix for issue 57 until a few hours ago, now any Gtk window can be resized. I know it works for diakopter++ on Windows as well. 04:32
sorear nice
sorear is now reading the .net serialization docs 04:33
04:34 flussence joined 04:35 colomon left, alester left, saaki left, jfried left, robinsmidsrod left, ruz left, TimToady left, szabgab left, JodaZ_ left, sbp left, nsh left, _sri left, sjn left, ranguard left, betterworld left, jdhore left, alester_ joined 04:37 WhyteGurl23 joined
WhyteGurl23 males hmu 04:37
04:38 jdhore joined, ranguard joined, szabgab joined, sjn joined
sorear WhyteGurl23: hi. you seem to be a chatmosphere user. 04:38
WhyteGurl23: this channel is used to coordinate the development of the next version of the "Perl" programming language.
04:38 uasi joined
sorear WhyteGurl23: please tell chatmosphere to remove #perl6 from its list of dating channels. 04:39
04:39 robinsmidsrod joined
WhyteGurl23 male 23-32 hmu 04:40
sorear WhyteGurl23: what language(s) do you speak? ¿habla español? 日本語に話せますか? 04:43
stupid IRC proxies blocking my geo-IP
04:44 saaki joined, jfried joined, ruz joined, TimToady joined, JodaZ_ joined, sbp joined, nsh joined, _sri joined, betterworld joined, donri left, donri joined 04:45 WhyteGurl23 left 04:49 [particle] left 05:05 mberends left 05:09 mberends joined 05:15 koban` joined 05:20 odoacre left 05:22 packetknife left, sftp left 05:25 athomason left, athomason_ joined 05:26 packetknife joined
mberends sorear: I've met two use cases for serialization in CLR: 1. passing objects from one process to another for Remote Method Invocation, and 2. persistent storage of objects for resumable workflow engines. 05:28
05:30 packetknife left 05:31 packetknife joined 05:32 daniel-s joined
sorear mberends: I am speaking of Perl 6 serialization. 05:33
05:33 slavik1 left
sorear just figured out most of the details for the namesake feature of niecza/serialize; optimism +5 05:33
mberends sorear: I was wondering where the CLR Interop would come in. All I could imagine was Perl 6 managing the networking or the storage of the CLR objects. I'm afraid I cannot yet imagine the reverse case, of CLR doing anything with serialized Perl 6 objects. They would be opaque to CLR. 05:37
sorear mberends: constant Foo = CLR::... # requires a CLR Type to be saved in the compiled module 05:46
mberends: it seems .net already has this pretty well handled, though. BinaryFormatter saves the assembly's FullName and uses that to reload it on deserialization; I'll copy that logic
I'd love to reuse the .net serializer but there doesn't seem to be a place to plug in bounding 05:47
oh, I found a place to plug in bounding 05:48
but there's still a disturbing amount of indirection here
05:51 slavik1 joined
mberends sorear: that's still good news, the indirection is most likely necessary, and the overheads less than the I/O that usually follows. 05:52
05:58 zostay left
sorear mberends: how has gtk been treating you? any new problems come up? 06:01
06:01 wtw joined 06:02 slavik1 left
mberends sorear: The Niecza side of Gtk has behaved extremely well. Most of the work is in finding which CLR classes and objects to use, sometimes they are in other namespaces. The Mono library documentation turns out to be patchy, even sparse in places. 06:05
06:05 zostay joined
sorear mberends: I suppose you're also using the language-neutral (ok, C) GTK docs? 06:06
06:06 orafu left 06:07 orafu joined
mberends sorear: correct 06:07
sorear: the matchboxes puzzle solution exits with a strange error message because of the custom event loop used in the place of Application.Run: gist.github.com/1240895 06:10
commute & 06:11
06:11 mberends left, gern joined
gern I've been trying to figure out if you can overload >=. It seems like multi infix:<>=>(...) is problematic. 06:14
sorear that doesn't work because quoting 06:15
there are several ways to make this work
multi infix:«>=»() # alternate quote character
gern Will do thanks
sorear multi infix:<< >= >>() # double the quote (<<<, <<<< works too)
multi infix:<\>=>() # escape the close-quote 06:16
multi infix:['>=']() # alternate syntax uses general Perl 6 quoting
multi infix:[">="]() # naturally this works too, as does qq () and friends
gern Yikes. More ways than I thought. Also I assume GLOBAL::infix<> will work 06:17
sorear GLOBAL:: won't work and wouldn't solve your problem anyway
you could define GLOBAL::infix:«>=»
GLOBAL::infix:<>=> is the same syntax error for the same reason 06:18
gern Perhaps I just need to read a little more :)
sorear but GLOBAL probably doesn't do what you think
06:18 packetknife left
gern I was overloading the operator within a class so I assumed it wouldn't be globaly visible withou that 06:18
sorear definitions using GLOBAL need to be accessed using GLOBAL 06:19
"4 >= 3" looks for infix:<< >= >> in lexical scopes *only*
gern OK. Thanks I tried a couple of your suggestions and they work great. 06:20
sorear you can either define >= outside the class, or define it "is export" and then import the class
gern I'll play with both.
Thanks again.
sorear note, Beijing-class Rakudos handle >= completely wrong
they *do* keep it in GLOBAL 06:21
this is probably fixed in nom
gern I'm using nom
06:21 alim joined
sorear excellent 06:21
06:21 alim left 06:22 alim joined 06:39 gern left 06:46 lestrrat left 06:52 lestrrat joined
dalek ecza/serialize: 8a35c4f | sorear++ | / (7 files):
Finish basic type creation
06:53
sorear out
07:43 mj41 joined 07:46 envi_ left 08:06 Trashlord left 08:11 mj41 left, mj41 joined 08:25 dakkar joined 09:03 mj41 left 09:05 Bzek left 09:12 PZt left
jnthn o/ #perl6 09:13
eiro jnthn, masak: can you give me an average price of the fly when you come to france ? 09:14
09:17 masak joined
masak eiro: I don't understand the question :/ 09:17
could you maybe restate it?
09:19 mj41 joined
eiro masak, sorry. i wonder how does it cost to take carre of your charges if we invite you to the next fpw 09:20
(jp12)
so if you remember the average cost of your fly sweden/paris, it would help 09:21
the IATA of your airport too 09:22
mux there's a perl6 event in paris?
eiro masak, oh, by the way: i'm wearing my t-shirt "i'm NOT normalized"
mux, no: perl event
masak eiro: :D 09:23
mux is wearing his t-shirt "Sex with your girlfriend, 74 people like it" with facebook-like icons.
www.tshirthell.com/funny-shirts/sex...like-this/
eiro but masak and jnthn came and gave valuable talks last events so i would like to sponsor them the next year
jnthn eiro: masak and I would tend to fly from CPH 09:25
09:25 vlixes` left 09:26 vlixes` joined
jnthn (Which is actually in Denmark, but still only 30 minutes from here :)) 09:26
eiro jnthn, thx 09:27
masak eiro: it cost 300 EUR last time.
09:27 orafu left
masak that's 300 EUR both ways. 09:28
grr, disambiguation is hard :)
the total cost was 300 EUR.
eiro 300 is for paris and back
ok
09:29 orafu joined 09:33 mj41 left 09:38 mj41 joined 09:41 woosley left 09:43 replore left 09:48 tty234_ is now known as tty234 09:52 _twitch joined 09:54 newsbad_com left
tadzik 'morning 10:01
jnthn o/ tadzik
Wondered which of us would be about first today ;)
tadzik jnthn goes to sleep later, and wakes up earlier. Madness
10:04 mj41 left 10:05 woosley joined
jnthn :) 10:06
jnthn is hacking a little more on inlining
10:07 lambdabot2 joined 10:09 lambdabot2 left 10:18 daxim joined, mj41 joined 10:20 kst` joined
flussence I don't think this is implemented in nom, but would /\N ** $chars-per-line/ be correct? 10:25
(ATM I'm using an ugly assertion that counts $0.Str.chars...)
niecza: my $str = ('a'..'z').join; my $tw = 8; say $str.comb(/\N ** $tw/).perl; 10:31
p6eval niecza v10-17-g8fdba33: OUTPUT«Potential difficulties:␤ Unsupported use of atom ** $tw as separator;nowadays please use atom+ % $tw at /tmp/I6Gpvh_uxt line 1:␤------> in; my $tw = 8; say $str.comb(/\N ** $tw⏏/).perl;␤␤["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"…
flussence oh.
niecza: my $str = ('a'..'z').join; my $tw = 8; say $str.comb(/\N ** 0..$tw/).perl; 10:32
p6eval niecza v10-17-g8fdba33: OUTPUT«===SORRY!===␤␤Malformed range at /tmp/IuUN68TH0Y line 1:␤------> in; my $tw = 8; say $str.comb(/\N ** 0..⏏$tw/).perl;␤␤Parse failed␤␤»
donri why does infix:<,> have lower precedence than ternary? 10:34
jnthn Place where I like that is so you can use it when passing an argument without having to add parens. 10:35
10:36 mauke joined
mauke hello is this where the ?:, action is 10:37
donri yep :)
except ternary in perl6 is ?? !!
mauke donri: oh, you asked the wrong question
don't confuse me, man 10:38
donri i did?
mauke yes
of course , should have lower precedence than ?? !!
donri i'm sensing a but
mauke that doesn't apply in the middle part 10:39
I don't know how perl6 syntax works but ?? !! is a incircumfix operator
i.e. it works like parens around the middle part 10:40
there is no syntactic ambiguity that would need to be resolved by precedence
jnthn std: 1 ?? 2, 3 !! 4
p6eval std 8b331d2: OUTPUT«===SORRY!===␤Precedence of , is too loose to use between ?? and !!; please use parens around inner expression at /tmp/EqH77wOeIb line 1:␤------> 1 ?? 2,⏏ 3 !! 4␤Parse failed␤FAILED 00:01 120m␤»
mauke yeah, I don't know where perl got that
it works in C
to use a perl5 example, this is like throwing a parse error for @foo[1, 2] and requiring @foo[(1, 2)] because [] binds tighter than , 10:43
flussence "1 ? 2, 3 : 4" is a syntax error in perl 5 :) 10:46
mauke yes, that's how this started
and I was surprised to learn that it's still broken in perl6 10:47
flussence what would that construct be used for in C? 10:48
mauke return cond ? printf("zomg\n"), foo() : bar();
10:50 mberends joined 10:52 vlixes`` joined 10:55 im2ee joined
im2ee Hello! :) 10:56
10:56 vlixes` left
tadzik hi im2ee 10:56
flussence mauke: that line could be written more clearly using &&, or as a function. Perl 6's behaviour isn't broken; we're not trying to be a better C. That's a job for D :) 10:58
tadzik a block could work too
mauke that line can't be written using &&
it is in a function
tadzik I guess Perl people are not really used to ',', and don't really miss this
mauke perl6's behavior is broken, regardless of whether it's trying to be a better C or not
tadzik rakudo: 1 ?? { say 'foo'; say 'bar' } !! say "NOPE" 10:59
p6eval rakudo 47d772: ( no output )
mauke perl5 provides do {...}, which is a decent workaround
jnthn The parens will do it too
mauke ah, bare block
nice
tadzik wait, why doesn't it work
jnthn oh, maybe not there
tadzik rakudo: 1 ?? { say 'foo'; say 'bar' }.() !! say "NOPE"
p6eval rakudo 47d772: OUTPUT«foo␤bar␤»
tadzik I'd expect it to be executed right away
jnthn tadzik: I woudln't.
tadzik: It's a closure there. 11:00
tadzik not like it's a sub or something
mhm
I'd expect it to be immediate block in this case
mauke flussence: I'm not talking about any particular piece of code. I simply don't understand why perl thinks this is a syntax error when 1) it's completely unambiguous and 2) the language it was stolen from (C, otherwise much more primitive) doesn't have this restriction
tadzik I can agree with that 11:01
11:04 uasi left, SHODAN joined 11:08 mberends left
dalek p: 422048a | jnthn++ | src/PAST/NQP.pir:
Fix handling of WHAT in nqp::op mapping.
11:09
11:11 lambdabot2 joined 11:13 lambdabot2 left 11:21 benabik left 11:22 envi joined 11:23 colomon joined
colomon [Coke]++! 11:23
11:24 lambdabot2 joined
masak mauke: I don't want to sound negative, but your presence here makes the ma<Tab> problem even worse :P 11:26
11:26 lambdabot2 left
masak mauke: also, ?? !! is an infix in STD.pm6. there's no concept of incircumfix. it's just an infix with strange parsing rules. 11:27
11:28 PZt joined 11:29 lambdabot2 joined
mux lambdabot is in #perl6? 11:32
> fix (1:)
lambdabot2 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...
11:32 _twitch left
tadzik is that haskell? 11:33
masak aye.
11:34 leprevost joined
masak hackage.haskell.org/packages/archiv...html#v:fix 11:34
tadzik > tail [1, 2, 3] 11:35
lambdabot2 [2,3]
tadzik hah, I can haskell
dalek kudo/optimizer: 1a2a145 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION to get map_node fixes.
kudo/optimizer: 7b09735 | jnthn++ | src/Perl6/ (2 files):
Add supprot for nqp::want, and make various bits of analysis smarter about PAST::Want.
kudo/optimizer: f70067c | jnthn++ | src/core/Int.pm:
Native operators should use nqp::want; get infix:<+>(int, int) to do so.
kudo/optimizer: e14527f | jnthn++ | src/Perl6/Optimizer.pm:
Correct the chain analysis so it only handles the very constrained (but very common) case I'd intended it to. Fixes various of the spectest regressions.
11:36 Psyche^ joined 11:37 Patterner left, Psyche^ is now known as Patterner, _twitch joined 11:42 _twitch left
masak I was unable to implement &fix in Perl 6, nor was I able to find a use for it afterwards ;) 11:42
tadzik :) 11:43
mux heh
tadzik I assume the use could be something of this sort
> take 5 fix (1:)
lambdabot2 Couldn't match expected type `[a]'
against inferred type `(a1 -> a1...
tadzik okay, I don't know haskell :P
mux fix is not that easy to grok
tadzik but that's like repeat, or is it?
mux fix is a fixed-point combinator
it allows you to write anonymous recursive functions 11:44
masak sounds like Y
tadzik mhm
mux exactly like Y, yes
masak the secret ingredient for recursion ;)
mux > fix ((1:) . scanl (+) 1)
lambdabot2 [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,1...
tadzik puts Learn Yourself Haskell for a Greater Good just after SICP on his list
mux > fix (\f n -> if n == 0 then 1 else n * f (n - 1)) 4 11:45
lambdabot2 24
mux (factorial using fix)
tadzik I just found a nice article which uses Haskell for examples, and I really wish I could read that 11:46
(twanvl.nl/blog/haskell/finding-rectangles)
donri > take 5 $ fix (1:)
lambdabot2 [1,1,1,1,1]
11:53 benabik joined
masak tadzik: reading that, I immediately think "dynamic programming". 11:55
er, I mean, subproblem caching.
11:55 _twitch joined
mux yes please :-) I dearly hate the term "dynamic programming" 11:56
one of the worse names I know of
tadzik programming while running 11:57
jnthn urgh
11:57 SHODAN left
jnthn gist.github.com/1250599 11:57
mux gets a mental picture of tadzik writing Haskell code while jumping 11:58
jnthn tadzik, or anyone else with a Parrot to hand: can you try the above gist and let me know if it fails for you too?
tadzik jnthn: sure 11:59
jnthn: it says 8589934590
masak 8589934590 here too. 12:00
jnthn huh, here it says something odd about add_i_n_n :S 12:01
OK, platform bug then.
mux error:imcc:eval_ins: op 'add_i_n_n' not found
jnthn mux: Aha! 12:02
mux that's what I get here (I suddenly realized I have parrot installed too)
jnthn mux: Platform?
mux FreeBSD
let me dig the parrot version
jnthn mux: 32 or 64 bit?
mux 32bits
jnthn tadzik, masak: bleeding Parrot, or the NQP one?
tadzik x64. He has bigger numbers
jnthn: PARROT_REVISION
mux rakudo-2011.07
jnthn Yeah but I'm on 64-bit too.
mux (tht may be a bit old)
tadzik s/He/We/, I meandt
masak oh, here it's parrot-3.3.0
cognominal jnthn, how optimization mesh with evals or require?
masak this is an x86_64 12:03
mux does that help at all?
This is Parrot version 3.6.0 built for i386-freebsd.
jnthn mux: Well, it tells me it's not just a Windows issue :)
mux alright :) 12:04
jnthn cognominal: I probably need a bit more detail onw aht you want to know.
*on what
cognominal: require - well, it's runtime so anything you pull in then is going to be too late to, for example, inline.
12:06 packetknife joined, Trashlord joined
cognominal my concern was one can dynamically create subs in eval. Maybe that can mess with the hypotheses used on optimization. Not sure though. 12:06
[Coke] yawns 12:07
masak cognominal: nope. 12:09
cognominal: evals are in a lexical scope below the compiled code. 12:10
so it all works out fine.
12:10 vlixes``` joined, SHODAN joined
cognominal nice 12:11
masak in cases where it doesn't work out fine, there's wording in the spec to the effect of "if you're doing funky stuff with evals, and the optimizer wants to make assumptions about normality, the optimizer wins and you lose".
mux lol
cognominal if the user is warned everything is fair. 12:13
12:14 slavik1 joined, vlixes`` left
mux I wish specs were written that way rather than the usual, terse style 12:15
"You lose" is so much better than "undefined behaviour"
masak of course, it's only true if your goal was defined behaviour :P 12:17
cognominal undefined behavior has some bad C-ish after taste. One may get the false impression it is platform specific.
flussence Two subs enter! One sub leaves!
jnthn nom: sub foo(:$a) { }; foo(a => 3)
p6eval nom 47d772: ( no output )
benabik I like the way my programming language theory professor described undefined behavior. H;s -> H';s' (H = heap, s = statement) where s' is an unknown statement and H' is the state of "the computer is on fire" 12:20
mux hahaha, nice :) 12:21
masak reminds me of marc.info/?l=linux-kernel&m=102...12&w=2 12:22
im2ee Where rakudo gets libs from?
env PERL6LIB? :) 12:23
12:24 mj41 left
mux masak: awesome. makes me wish I was born at that time :-) 12:24
masak me too. 12:25
but the present isn't too bad either.
cognominal wishes somone will blog someday about settings and serialization 12:26
masak there are certainly interesting things going on in CS and software engineering if you look.
tadzik im2ee: yes
masak cognominal: I blogged about settings a few weeks back.
jnthn cognominal: I'll blog more about serialization once I really dig in to it.
cognominal: All that exists right now is various bits of local sketching on it. 12:27
cognominal: I've been looking more at the optimizer recently.
Next post is probably about that. :)
12:27 wamba joined
cognominal jnthn++ masak++ 12:27
[Coke] hey, autounfudge works on niecza with limited prodding. 12:28
nifty.
cognominal masak, your stuff about -n and -p was nice indeed. 12:29
[Coke] wonders why tools/test_summary.pl is hand-parsing TAP and not using the lovely module fo rit. 12:30
dalek kudo/optimizer: a3f69b6 | jnthn++ | src/ (2 files):
Don't lie about what types we can provide.
12:31
kudo/optimizer: 1f0a570 | jnthn++ | src/Perl6/Optimizer.pm:
Don't lose :named during inlining a call. Fixes majority of inliner-induced failures.
12:31 replore joined 12:32 replore left
masak cognominal: thank you. I'm sure there's more to write about settings, and definitely more to write about serialization. 12:32
I'm only starting to learn about serialization now that I'm working on macros in nom.
im2ee "Default constructor only takes named arguments". 12:33
What may be wrong? :)
jnthn masak: Plus the world is going to change there in a little bit.
im2ee: Are you on optimizer branch?
im2ee jnthn, hmm, on nom.
tadzik im2ee: what did you write?
jnthn im2ee: Heh, curious conincidence. I just fixed a bug in the optimizer that caused a spectest to fail with that error. :) 12:34
tadzik im2ee: autogenerated .new never take positional parameters, double check that
12:36 mj41 joined
im2ee jnthn: 12:36
Default constructor only takes named arguments
in method new at src/gen/CORE.setting:514
in method <anon> at main.p6:10
in method BUILDALL at src/gen/CORE.setting:536
in method bless at src/gen/CORE.setting:526
in method new at src/gen/CORE.setting:511
in <anon> at main.p6:47
in <anon> at main.p6:1
jnthn im2ee: How are you calling .new?
im2ee it's main.p6:10, 47 and the next one is :1 : 12:37
12:37 dakkar left
masak im2ee: could you perhaps gist the code? 12:37
im2ee ok :)
jnthn For anybody who wants to check out how inlining helps so far, grab latest optimizer branch, then time each of these three:
my $i = 0; while $i < 1000000 { $i = $i + 1 }; say $i
my Int $i = 0; while $i < 1000000 { $i = $i + 1 }; say $i 12:38
my int $i = 0; while $i < 1000000 { $i = $i + 1 }; say $i
tadzik ooo
10.37s user 0.17s system 99% cpu 10.549 total
12:38 bluescreen10 joined
tadzik 6.51s user 0.17s system 99% cpu 6.704 total 12:38
im2ee It's the code:
pastebin.com/2tDvuVqe
tadzik 1.81s user 0.19s system 99% cpu 1.997 total
luvly
masak :) 12:39
im2ee: IO::Select.new( $!listener )
won't work.
tadzik im2ee: IO::Select.new( $!listener );
im2ee Hmm, right...
masak something like :$!listener might.
tadzik oh, fastmasak
masak tadzik: well, I knew the line number already :P
tadzik ;)
im2ee masak++ tadzik++ , thanks. :)
Sorry for the problem. :) 12:40
tadzik im2ee: plus, IO::Select has no listener attribute :)
masak im2ee: don't apologise, just write wonderful code ;)
tadzik just .new() it, and add filehandles using .add() then
patches welcome 12:41
im2ee masak, ok, thanks. :)
thanks tadzik :)
jnthn tadzik: There's an annoying code-gen issue at the moment, though 12:42
my int $i = 0; while $i < 1000000 { $i = $i + 1; 1 }; say $i
tadzik: Try ^; it should be even faster.
tadzik 1.48s 12:43
it's blocking on the startup time I suppose :)
im2ee I work on the something like TCP simple server. I don't exactly know if it'll be useful, but .. who knows. :)
tadzik im2ee: one could probably subclass it to write a specific tcp server 12:44
flussence OTOH, perl -MMoose -wle with the same code took >1s on a cold start here :)
jnthn tadzik: Right.
tadzik :)
jnthn tadzik: Well, you could always repeat them with 10 million.
flussence (and >0.2s on the second run, so it's not that far off...)
jnthn ugh, want a sarnie but have no bread 12:45
tadzik jnthn: it's then 11.13s vs 7.30s
jnthn shop &
tadzik bus &
jnthn tadzik: ok, good to know.
masak jnthn: feels silly that that should be even faster :/
jnthn masak: What feels silly exactly?
masak that a '1;' at the end makes it faster. 12:46
jnthn masak: Yes, as I said, it's avoiding a code-gen bug.
masak also, why do you keep writing 1e6 with so many zeroes?
:P
jnthn nom: say 1e6.WHAT
p6eval nom 47d772: OUTPUT«Num()␤»
jnthn That's why.
benabik nom: 1e6.Int.say
p6eval nom 47d772: OUTPUT«1000000␤»
jnthn masak: Anyway, the code-gen bug will get fixed at some point, maybe even soonish. 12:47
im2ee nom: sub m ( Regex $s ) { say $s }; m(/lol/); 12:48
p6eval nom 47d772: OUTPUT«_block1019␤»
im2ee how to print this regex? :)
jnthn masak: PCT wasn't really built with native types in mind. Various bits of pmichaud++'s additions of late have helped that, but there's still the odd issue here and there.
masak oki
jnthn afk, shop
[Coke] nom: /lol/.gist.gist 12:50
p6eval nom 47d772: ( no output )
[Coke] nom: /lol/.gist.say
p6eval nom 47d772: OUTPUT«_block1010␤»
[Coke] nom: /lol/.perl.say
p6eval nom 47d772: OUTPUT«_block1010␤»
[Coke] knowing that a regex is a sub under the covers, I'm not sure how you'd get the original regexp back out. 12:51
flussence doesn't the string of input code get saved somewhere? 12:52
12:52 satyavvd left 12:53 daniel-s left
masak [Coke]: the regex engine simply needs to do '&regex-sub but role { method perl { $original-string } }' 12:54
[Coke] masak - assuming it was constructed with a literal, sure. ;) 12:55
masak hm :) 12:56
12:56 [particle] joined
[Coke] which I grant would cover this case. 12:56
12:58 dakkar joined
masak interesting -- regex objects share that property with quasis, that interpolated variables are stored as variables, not as values. 12:58
with qq strings for example, it's the values. 12:59
[Coke] "Synopsis", "pass","fail","todo","skip","plan","spec"
"total", 6270, 157, 3, 1477, 7907, 21768
Not sure why there are fails in the Niecza spec run since I just did a clean run last night.
(results of a slightly modified test-summary.pl run cribbed from rakudo's tools dir) 13:00
im2ee " expected IO but got IO::Socket::INET instead"
IO::S::INET isn't IO type? :)
13:03 vlixes``` left 13:04 daniel-s joined 13:07 woosley left 13:08 mj41 left, kst` left, daxim left, orafu left, mauke left, szabgab left, DarthGandalf left, skangas left, jlaire left, mikemol left, m6locks left, Grimnir_ left 13:09 mberends joined 13:10 mj41 joined, mauke joined, kst` joined, daxim joined, orafu joined, szabgab joined, m6locks joined, DarthGandalf joined, skangas joined, jlaire joined, mikemol joined, Grimnir_ joined 13:11 sjn left, sjn joined, mauke left, mauke joined 13:20 alester_ left
mberends [Coke]: great to see test_summary also working on Niecza! It does show one of the shortcomings of prove, that it counts 1477 skips as passes. 13:20
13:24 pmurias joined 13:26 GlitchMr joined
GlitchMr "load_bytecode" couldn't find file 'CORE.setting.pbc' 13:26
...?
13:27 dark_x joined
mberends GlitchMr: that may be the result of a failed build. Try 'make realclean', then 'perl Configure.pl --gen-parrot', and then 'make' again. 13:29
GlitchMr I used Windows build
I installed Parrot-win32 and after that Rakudo on it... 13:30
I haven't compiled it...
Weird...
m6locks something with them directory settings 13:31
mberends yes. I don't have a Windows system to compare with you :(
GlitchMr Maybe I did something wrong 13:32
Maybe I've downloaded wrong file
C:\rakudo\bin>perl6.exe 13:33
> say "Hello, world :)."
Hello, world :).
lambdabot2 Not in scope: `say'
GlitchMr OK, it seems to work...
I accidentally activated bot lol 13:34
mberends :) at least your home system is saying Hello 13:35
GlitchMr > my $a
Any()
lambdabot2 Not in scope: `my'
GlitchMr ...?
Any()...? 13:36
I know it doesn't have yet value, but Any() is pretty weird...
> 2+2
lambdabot2 4
GlitchMr At least that...
13:37 jimmy1980 joined
mberends GlitchMr: instead of > try rakudo: to talk to out Perl 6 bot 13:37
GlitchMr OK :).
13:37 blue_ joined
mberends rakudo: say "Hello GlitchMr" 13:37
p6eval rakudo 47d772: OUTPUT«Hello GlitchMr␤»
GlitchMr I see null byte... 13:38
mberends it's the newline that comes from say
GlitchMr Oh, I see.
m6locks so, perl6 package for ubuntu? anyone using ubuntu here?
GlitchMr Makes sense.
mberends m6locks: Ubuntu yes, but perl6 compiled from source 13:39
GlitchMr rakudo: 1 => 2 => 3 => 4 => 5
p6eval rakudo 47d772: ( no output )
m6locks mberends: aye
GlitchMr rakudo: use Data::Dumper; print Dump 1 => 2 => 3 => 4 => 5
p6eval rakudo 47d772: OUTPUT«===SORRY!===␤Could not find Data::Dumper in any of: lib, /home/p6eval/.perl6/lib, /home/p6eval/nom-inst2/lib/parrot/3.8.0-devel/languages/perl6/lib, .␤»
flussence Debian has rakudo packages, you can use those
mberends no Data::Dumper in Perl 6, there is a .perl method to print 13:40
m6locks flussence: got url?
GlitchMr mberends, more details?
How can I use it?
mberends rakudo: say ( 1 => 2 => 3 => 4 => 5).perl
p6eval rakudo 47d772: OUTPUT«1 => 2 => 3 => 4 => 5␤»
GlitchMr Makes sense
rakudo: print { 1 => 2, 3 => 4, 5 => 6) . perl 13:41
p6eval rakudo 47d772: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 1␤»
GlitchMr rakudo: print { 1 => 2, 3 => 4, 5 => 6}.perl
p6eval rakudo 47d772: OUTPUT«{"1" => 2, "3" => 4, "5" => 6}»
GlitchMr rakudo: print { 1 => 2, 3 => 4, 5 => 6 => 7}.perl
p6eval rakudo 47d772: OUTPUT«{"1" => 2, "3" => 4, "5" => 6 => 7}»
flussence m6locks: packages.debian.org/sid/rakudo 13:42
m6locks thx
oh btw, adding that link to the rakudo.org page would be nice 13:44
GlitchMr rakudo: $_ = 'hEllo'; s/E/e/; print
p6eval rakudo 47d772: ( no output )
m6locks it's not there, can only fedora, suse, freebsd and what have you, people are asking about it in the comments section
+find 13:45
flussence sounds like the majority are fine, maybe you should tell ubuntu to fix it :)
m6locks fix what? 13:46
GlitchMr rakudo: my $hash = 'flexibility'=>'of', 'arrays', 'like PHP', 3, 'does it exist?' => '?'; print {$hash}.perl
p6eval rakudo 47d772: OUTPUT«_block1011»
flussence lack of perl 6 packages :) 13:47
m6locks well then again, I can post the link to the comments, hope webmaster sees it and adds it to the list
GlitchMr Probably not.
m6locks but I can try!
GlitchMr Whatever, mixing arrays and hashes would be strange anyway...
flussence rakudo: say (a=>1, 2, 'b').perl 13:48
GlitchMr It never helped me, it's actually annoying in PHP...
p6eval rakudo 47d772: OUTPUT«("a" => 1, 2, "b")␤»
flussence rakudo: say (a=>1, 2, 'b')<a>.perl
p6eval rakudo 47d772: OUTPUT«Method 'at_key' not found for invocant of class 'Parcel'␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:1016␤ in block <anon> at /tmp/zdNogHz3pi:1␤ in <anon> at /tmp/zdNogHz3pi:1␤␤»
13:48 alvis left
GlitchMr I guess I cannot use modules from Perl 5 in Perl 6... 13:51
blue_ looking 4 nitro??? 13:52
dalek kudo/optimizer: 1cb3f8d | jnthn++ | src/core/Int.pm:
A few more native int operators. If anybody fancies doing the num ones, dive in!
13:55
jnthn GlitchMr: Not really at the moment, though there is work going on to make that possible. 13:58
mberends jnthn: I may dive in after $work :) 13:59
jnthn mberends: yay :) 14:01
14:13 wolfman2000 left 14:15 leprevost left 14:16 donri left 14:17 jimmy1980 left 14:18 kaleem left, shinobicl joined, _twitch left 14:19 cognominal_ joined 14:20 blue_ left 14:21 cognominal left 14:23 wtw left 14:24 koban` left 14:36 sftp joined 14:40 SHODAN left 14:49 kmwallio joined
masak decommutes 14:52
14:52 masak left
sorear good * #perl6 14:54
mauke: Hi! 14:55
@part #perl6
lambdabot2 Not enough privileges
14:55 ChanServ sets mode: +o sorear 14:56 sorear sets mode: +q lambdabot2!*@*, sorear sets mode: -o sorear
daxim what was that good for now? 14:57
dalek ast: a242d03 | jnthn++ | S06-signature/slurpy-params.t:
Remove tests that relied on old named to positional behavior; re-fudge for Rakudo.
14:57 alim left
mberends good * sorear 14:57
14:57 [particle]1 joined
sorear daxim: lambdabots are not welcome here. That decision was made long before my tenure and will only be reversed by consensus 14:58
14:58 [particle] left
dalek kudo/nom: 38f1a2c | jnthn++ | src/ (2 files):
Implement 'is required' on parameters.
15:02
kudo/nom: 9da03d2 | jnthn++ | t/spectest.data:
Run S06-signature/slurpy-params.t.
kudo/nom: 8ba6979 | jnthn++ | src/core/Range.pm:
Tiny optimization to range iteration.
15:07 mberends left 15:08 molaf joined
benabik What is lambdabot? 15:12
aloha: lambdabot? 15:13
15:14 pmurias left
sorear benabik: #haskell bot. Was kickbanned from here years ago, some clueless person brought it back under a different name. 15:21
dalek ast: 67a09e1 | jnthn++ | S12-methods/parallel-dispatch.t:
Correct private method call usage in parallel dispatch tests.
15:22
sorear very spammy, responds to every line starting @ or >
and with that I leave
benabik sorear: thanks
and buy
*bye
15:23 thou joined
dalek kudo/nom: 1eeac15 | jnthn++ | src/core/Mu.pm:
Fix error reporting for non-existent private methods.
15:23
kudo/nom: 1e95c0a | jnthn++ | src/Perl6/Actions.pm:
Catch illegally unqualified private method calls at compile time.
jnthn That's 2 more RTs down. :) 15:26
15:26 kaleem joined 15:29 kaare_ joined 15:33 thou left 15:37 alpha-- joined, alpha-- left, alpha-- joined 15:38 packetknife left
jnthn nom: 1.5 lcm 1.5 15:40
p6eval nom 47d772: OUTPUT«(timeout)maximum recursion depth exceeded␤»
flussence interesting that it gets both a timeout and an error message... 15:41
jnthn I guess lcm and gcd make no sense on non-integral values?
kmwallio is there a way to capture the output of a command ran using run() ? 15:42
jnthn kmwallio: Don't think run does that; maybe use qx{the command} instead. 15:44
kmwallio cool thanks 15:45
is there any place to easily look things like that up?
15:46 preflex joined
jnthn kmwallio: Not sure where to point you at in this case...I don't think the book covers these. 15:50
im2ee IO::S::INET isn't IO type? :)
IO::Socket::INET isn't IO type?* 15:51
dalek kudo/nom: d104b94 | jnthn++ | src/core/Numeric.pm:
Fix infinite recursion with lcm/gcd. Resolves the [lcm] 1..3 issue.
jnthn Don't think it inherits from IO, if that's what you mean.
im2ee I got error: 15:52
" expected IO but got IO::Socket::INET instead"
15:52 alpha-- left
im2ee In IO::Select.add() 15:53
jnthn Ah, hm
Maybe ask the author of IO::Select :)
im2ee tadzik is afk :) 15:55
So, i'm waiting. :)
15:57 lambdabot2 left 15:59 espadrine left
jnthn nom: package Foo { }; class Foo { } 16:00
p6eval nom 1e95c0: ( no output )
bbkr_ nom: package Foo { }; class Foo::Bar { }; say "alive"; 16:01
p6eval nom 1e95c0: OUTPUT«alive␤»
jnthn nom: module Foo { }; class Foo { }
p6eval nom 1e95c0: OUTPUT«===SORRY!===␤Illegal redeclaration of class 'Foo' at line 1, near "{ }"␤»
jnthn Good 16:02
We're one ticket being closed away from being back down to 850.
moritz \o 16:05
jnthn moritz! \o/ 16:06
16:06 Holy_Cow joined 16:07 Holy_Cow left 16:08 risou_awy is now known as risou 16:11 MayDaniel joined
jnthn moritz: Does your bitwise buf/str work let us close this one: rt.perl.org/rt3/Ticket/Display.html?id=67852 16:14
moritz jnthn: it has always been closable in nom since the creation of the bitwise string ops... 16:15
jnthn: it's just that the typical parrot-string-vs-perl6-Str test is .trans, which is NYI in nom 16:16
dalek kudo/nom: def94fa | jnthn++ | src/Perl6/Grammar.pm:
Add error from STD for using $0 in a prameter list.
16:17 mberends joined
GlitchMr rakudo; multi sub postfix:<!> is equiv:<++> ( Int $x ) { return [*] 1 .. $x } say 3! 16:17
rakudo: multi sub postfix:<!> is equiv:<++> ( Int $x ) { return [*] 1 .. $x } say 3!
p6eval rakudo 1e95c0: OUTPUT«===SORRY!===␤Malformed block at line 1, near "( Int $x )"␤»
moritz jnthn: about the int ops, why does it need a box?
GlitchMr: custom ops are not yet done in rakudo/nom 16:18
GlitchMr Oh, I see...
moritz GlitchMr: and we never did 'is equiv', though niecza does that
GlitchMr niecza: multi sub postfix:<!> is equiv:<++> ( Int $x ) { return [*] 1 .. $x } say 3!
p6eval niecza v10-17-g8fdba33: OUTPUT«===SORRY!===␤␤Unhandled trait equiv:<++> for this context at /tmp/zxVJ7P6sal line 1:␤------> multi sub postfix:<!> is equiv:<++> ⏏( Int $x ) { return [*] 1 .. $x } say 3!␤␤Strange text after block (missing comma, semico…
moritz jnthn: ah, never mind, finally I understood 16:19
GlitchMr Makes sense...
moritz GlitchMr: is equiv(&postfix:<++>) iirc
GlitchMr niecza: multi sub postfix:<!> is equiv(&postfix:<++>) ( Int $x ) { return [*] 1 .. $x } say 3! 16:20
p6eval niecza v10-17-g8fdba33: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/kyL3Dvbt02 line 1:␤------> :<++>) ( Int $x ) { return [*] 1 .. $x }⏏ say 3!␤␤Parse failed␤␤»
moritz niecza: multi sub postfix:<!> is equiv(&postfix:<++>) { [*] 1.. $^X }; say 5!
p6eval niecza v10-17-g8fdba33: OUTPUT«===SORRY!===␤␤Unsupported use of $^X variable; in Perl 6 please use $*EXECUTABLE_NAME at /tmp/apX29CxZ6e line 1:␤------> > is equiv(&postfix:<++>) { [*] 1.. $^X ⏏}; say 5!␤␤Parse failed␤␤»
moritz niecza: multi sub postfix:<!> is equiv(&postfix:<++>) { [*] 1.. $^a }; say 5!
p6eval niecza v10-17-g8fdba33: OUTPUT«120␤»
GlitchMr Yay
moritz niecza: multi sub postfix:<!>(Int $a) is equiv(&postfix:<++>) { [*] 1.. $a }; say 5!
p6eval niecza v10-17-g8fdba33: OUTPUT«120␤»
moritz GlitchMr: seems like the signature needs to come before the trait 16:21
GlitchMr niecza: multi sub postfix:<!>(Int $a) is equiv(&postfix:<++>) { [*] 1.. $a }; say 1337!
p6eval niecza v10-17-g8fdba33: OUTPUT«8874663836657679616624106464181330095477201209934728179488259618265583472082422451756532829820227220586694812398717056396577963484185843624972811566695752967507809547583275355249722514792503207256105871660473160528528660309295831784330274184810480309094806…
GlitchMr ... nice 4 seconds pause
niecza: multi sub postfix:<!>(Int $a) is equiv(&postfix:<++>) { [*] 1.. $a }; say 133713371337133713371337!
p6eval niecza v10-17-g8fdba33: OUTPUT«(timeout)»
GlitchMr (timeout)... I see...
moritz GlitchMr: 2.5 of which are niecza startup time
GlitchMr Makes sense... 16:22
16:26 thou joined 16:31 kaleem left 16:35 mj41 left 16:36 kaleem joined
dalek ast: 41c9d28 | jnthn++ | S06-advanced/callsame.t:
Fix test file that assumed Int ~~ Num, and unfudge the test Rakudo rightly didn't pass before it was fixed.
16:36
16:38 MayDaniel left 16:43 Holy_Cow joined
jnthn OK, another bunch of tickets marked testneeded :) 16:43
16:45 Holy_Cow left
moritz jnthn: it seems that adding num operator multis break tests with Inf, -Inf and NaN 16:48
jnthn: (optimizer branch)
multi prefix:<->(num $a) {
nqp::want(
nqp::p6box_n(nqp::neg_n($a)),
'Nn', nqp::neg_n($a),
);
}
$ ./perl6 -e 'say -Inf' 16:49
===SORRY!===
error:imcc:undefined identifier 'Inf'
it generates
set $N100, Inf
neg $N101, $N100
jnthn moritz: Interesting. 16:51
moritz: Maybe Inf and NaN need to return PAST::Wants.
moritz jnthn: or maybe the num serialization of Inf needs to be fixed 16:52
jnthn moritz: Yes, that's where you'd add it.
felher I'd like to get a key-grep method for Hash and Array. So one can write [email@hidden.address] { $_ % 2 }' instead of [email@hidden.address] { @array[$_] % 2 }' or [email@hidden.address] { $^k if $^v % 2 }'. I know thats doesn't help much, it's easy to implement though. I have no idea if it should get specced or not, but as im just hear to learn, i would really like to hear your objections about it. :) 16:53
16:54 GlitchMr left
moritz felher: so test the value, but return the key? 16:55
felher moritz: yes
jnthn moritz: Do you think the tests under "# test postcircumfix parallel dispatch" in parallel-dispatch.t are invalid now?
moritz: They seem to assume that hyper dispatch doesn't descend into data structures - apart from it now does. 16:56
moritz jnthn: yes, bogus 16:57
jnthn moritz: Feel free to push the num native ops to optimizer even if it breaks tests, btw. It's OK to have a little mess in there for now.
moritz: Thanks, just wanted a second opinion. :)
moritz jnthn: I wonder if they can be fixed
jnthn I'm just spectesting a fix for the other reason we fail that file
moritz jnthn: do hypers descend into pairs?
jnthn moritz: I'm not entirely sure how.
moritz: Not sure they do.
moritz nom: (a => 1)>>.say 16:58
p6eval nom 1e95c0: OUTPUT«Method 'at_key' not found for invocant of class 'Pair'␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:1020␤ in method reify at src/gen/CORE.setting:3744␤ in method reify at src/gen/CORE.setting:3649␤ in method gimme at src/gen/CORE.setting:3986␤ in method…
moritz nom: (a => 1, b => 2)>>.say
p6eval nom def94f: OUTPUT«"a" => 1␤"b" => 2␤»
moritz looks like not
so (a => 1, a => 2)>>.<a> would be a valid test
jnthn nom: say (a => 1, a => 2)>>.<a> 17:01
p6eval nom def94f: OUTPUT«Method 'at_key' not found for invocant of class 'Pair'␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:1020␤ in method reify at src/gen/CORE.setting:3744␤ in method reify at src/gen/CORE.setting:3649␤ in method reify at src/gen/CORE.setting:3649␤ in method…
moritz hm
jnthn nom: say (a => 1).<a>
p6eval nom def94f: OUTPUT«Method 'at_key' not found for invocant of class 'Pair'␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:1020␤ in block <anon> at /tmp/BsLMGC1u03:1␤ in <anon> at /tmp/BsLMGC1u03:1␤␤»
moritz well, that needs to be fixed :-)
felher: I like the suggestion, and i had similar ideas myself; what I lack so far is an idea how to generalize it well 17:02
felher: it would make sense for .grep, .map and .first at least
dalek kudo/nom: 71d1557 | jnthn++ | src/Perl6/Actions.pm:
Fix .+$foo() style dispatches (many candidates plus indirect name in combination).
moritz hm, not sure about map 17:04
17:04 Chillance joined
moritz map would just always return .keys 17:04
felher moritz: Yeah, i used it for grep and first so far.
17:05 dakkar left
dalek ast: 185b9a1 | jnthn++ | S12-methods/parallel-dispatch.t:
Remove some bogus tests and add a replacement one suggested by moritz++.
17:06
moritz felher: gist.github.com/1251289
17:08 localhost left 17:09 localhost joined
dalek kudo/nom: 9e7a62e | jnthn++ | src/core/Enum.pm:
Add Enum.at_key.
17:10
kudo/nom: db05a44 | jnthn++ | t/spectest.data:
Run S12-methods/parallel-dispatch.t.
felher moritz: nice. :) 17:11
dalek ast: 448e286 | jnthn++ | S12-methods/calling_sets.t:
Unfudge a few tests for Rakudo.
benabik Why is it at_key and at_pos instead of AT_KEY/AT_POS or even postfix:[]/{} ?
17:13 masak joined
masak bom tarde, #p6 17:13
jnthn
.oO( set up us the bom )
masak jnthn: yes -- lcd and gcm only make sense for integral types, since it hinges on the concept of divisibility. 17:15
cognominal_ heads up to nqp and is flabbergasted by the number of folders: NQPQ, QAST, QRegex. What is all this new (or not so new?) Q stuff. 17:17
masak jnthn: should work fine on Gaussian integers, though I haven't tried :)
jnthn masak: :P
nom: say [lcm] 1..3
p6eval nom def94f: OUTPUT«6␤»
jnthn masak: Fixed that at least :)
masak cognominal_: Perl 6 has been bought wholesale by the Chinese social network, QQ.
PerlJam cognominal_: Q .... you know .... like from the Continuum 17:18
masak cognominal_: by popular demand, we're changing name from "Perl 6" to "Qerl".
PerlJam heh
jnthn cognominal_: People keep complaining about the name "Perl 6", and it's part of a highly secretive campaign to...dammit, masak beat me!
masak \o/
TimToady you sure we're not in the James Bond universe instead? 17:19
masak dang, missed that one!
"and who are you, R?" :)
cognominal_ let me tell you that Q is pronouced like cul, that is "ass" in French. :)
PerlJam TimToady: that's probably a better conceptual fit.
jnthn cognominal_: I look forward to talking about this exciting new technology at FPW next year :P 17:20
PerlJam TimToady: except I want to know who's M ?
masak cognominal_: that's between you and the French! :P
17:20 daniel-s left
masak PerlJam: Gloria. 17:20
17:20 mj41 joined
TimToady SWMBO indeed 17:20
cognominal_ this year was the year of acmeism in the french OSDC. 17:21
masak TimToady: :)
PerlJam cognominal_: that makes me think ingy might change his name again :)
cognominal_ anyway, that was at the first french OSDC that acmeism was unleashed on a unsusspecting world in the fiest place.
*first 17:22
felher moritz: i would like to have such a method builtin nevertheless. I needed it quite a few times now. I like to discuss it more but my connection is just dying each and every 10 seconds or so. So i'm off 'till i'm at home. Thnx for your opionion :) 17:24
17:25 dark_x left
cognominal_ more seriously, why almost every name has Q counterpart and what is the difference between stuff with a Q and without it? 17:26
17:27 sayu joined
jnthn cognominal_: It's the beginnings of a set of refactors to code-gen and similar, plus a new regex engine. 17:28
cognominal_ ok
17:32 thou left 17:33 risou left, risou_awy joined, risou_awy is now known as risou
tadzik is back 17:34
17:34 risou is now known as risou_awy, risou_awy is now known as risou 17:36 risou left, risou_awy joined, risou_awy left, risou joined
ingy o/ 17:38
sjohnson hi 17:39
dalek kudo/optimizer: ebf115c | moritz++ | src/core/Num.pm:
prefix:<->(num). Wracks havoc of tests becase -Inf now generates invalid PIR (set $N100, Inf)
ingy buggers off to write yaml.pgx 17:40
I'll need a <INDENT> <DEDENT> magics
seems like a parser subclass to me 17:41
jnthn moritz: Will look a bit after dinner. 17:42
moritz: Unless you beat me.
er, beat me to looking at it, I mean :)
moritz ingy: try <ARTHURDENT> :-) 17:45
benabik moritz: I've been calling that rule <DENTARTHURDENT>. Is that first DENT unneeded? ;-) 17:46
moritz benabik: if oyu call them <ARTHURDENT> and <ARTHURUNDENT>, the first DENT is indeed superfluous :-) 17:48
*you
tadzik huh 17:50
"Uninstantiable representation does not support attribute storage"
17:50 kaleem left
tadzik I suppose nqp::getattr fails for IO::Socket because it's a role, not a class 17:50
moritz correct
you need to supply the class into which the role was composed
tadzik but wait, I don't even pass IO::Socket in there 17:51
moritz what do you pass in there?
tadzik my subset Handle of Any where any(IO, IO::Socket);
still, I pass an ordinary IO
moritz what does your call look like?
to nqp::getattr, that is 17:52
ingy moritz: what about <CDENT> ?
tadzik my $fh := nqp::getattr(pir::perl6_decontainerize__PP($handle), IO, '$!PIO');
moritz and what does $handle.WHAT say?
tadzik oh, IO
I have IO in there, that should probably be what the $handle is 17:53
I bet it'll say Handle...
it doesn't say anything, as if it was a compile-time error or so
jnthn nom: subset Money of Int; class C { has Money $.x }; C.new 17:54
p6eval nom def94f: ( no output )
tadzik I'm on optimizer btw
jnthn hm, not that.
moritz hmmm
nom: say (1e0 cmp 1e0).WHAT
p6eval nom def94f: OUTPUT«Num()␤»
moritz shouldn't that be an Int?
tadzik but I get 1..4 printed before 17:55
jnthn Yes.
colomon moritz: it should be an enum, really 17:56
tadzik nom: say Int.WHAT.WHAT
p6eval nom def94f: OUTPUT«Int()␤»
tadzik is it safe to pass $foo.WHAT as a second arg of nqp::getattr? 17:57
moritz tadzik: in first approximation, yes
tadzik well, it still fails before that somehow
moritz tadzik: it fails horribly if somebody subclasses the handle
tadzik right
I'd be glad if classes having $!PIO shared some common interface 17:58
masak make one :) 18:00
tadzik I'm not even asking about the spec stuff anymore, or Larry will shout at me again. Btw, I invented a new BUILDALL abuse to get the "do stuff after the object is done" :P 18:02
18:04 sayu left
diakopter Qerl makes me think of squirrel 18:11
TimToady 18:16
18:17 bluescreen10 left 18:18 donri joined
tadzik oh, maybe I did it subconsciously, I don't remember that sentence of yours 18:18
maybe because that was half a year ago
dalek ok: be3bf3b | Ivan64++ | src/basics.pod:
Clarify that the input data is stored in a file called "scores"
18:19
ok: ef3e150 | Ivan64++ | src/operators.pod:
I think %matches was meant as opposed to %games.
ok: 61bc204 | moritz++ | src/ (2 files):
Merge pull request #59 from Ivan64/master

Two minor corrections
18:22 daxim left 18:27 espadrine joined
[Coke] retro-convos, "Moose and qerl". 18:30
you have to say it with a bad russian accent.
[Coke] reserves that for a talk title!
18:31 MayDaniel joined
PerlJam But how do you pronounce "qerl"? 18:31
tadzik kłerl 18:33
moritz PerlJam: as you write it :-)
[Coke] kwerl. 18:34
18:38 c1sung left 18:39 risou is now known as risou_awy 18:42 c1sung joined 18:44 mj41 left
TimToady mauke: if you're going to hang out here comfortably, you ought to at least struggle feebly to figure out why C's approach to precedence might be considered suboptimal... :) 18:49
18:49 mj41 joined
mauke TimToady: in general or just the ,/?: bit? 18:51
18:51 wamba left
TimToady both :) 18:52
mauke then I don't see the problem
TimToady but certainly ?: is the proximate cause
C is different from Perl two ways at least
18:52 flussence_ joined
TimToady first, it doesn't allow assignment to ?: 18:53
mauke (C++ does; not a fundamental difference)
TimToady what should a ? b = c : b = d do?
PerlJam not something stupid :)
mauke oh, I think that's where C and C++ differ
if you follow strict precedence, you get (a ? b = c : b) = d 18:54
and IIRC that's exactly what perl5 does
TimToady which, you'll note, is an inconsistency
mauke NAK
TimToady between the "then" part and the "else" part
18:55 flussence left
TimToady people try to use it as a small if/then/else and get confused 18:55
mauke they do?
TimToady what should a ? b, c : d, e do?
mauke (a ? b, c : d), e
TimToady that's not what the typical user thinks 18:56
mauke [citation needed]
18:56 envi left
TimToady and we're trying to keep Perl from silently making mysterious mistakes that confuse users 18:56
18:56 flussence_ is now known as flussence
mauke this feels like the wrong way to do it, though 18:56
TimToady the use cases for allowing low-precedence ops inside ?: are all very fiddly
mauke what's missing is that the "else" part has no explicit end marker, unlike the "then" part 18:57
TimToady almost obfuscational
dalek kudo/optimizer: b95d441 | moritz++ | src/core/Num.pm:
more num ops; correct return value of cmp
kudo/optimizer: 0b30152 | moritz++ | src/core/Num.pm:
more num ops
mauke alternatively you could make ?: have different left-precedence and right-precedence
TimToady sure, but most people don't actually think of it that way
the expense of enforcing a couple of parens is well worth all the newbie errors it catches 18:58
and the expense of making a few people upset who think they're implied :)
mauke ok, that's at least a reason I can understand 18:59
TimToady so that is one place where Perl 6 forces people to say what they mean, just to be clear, just as you'd have to put parens after the !! if you want lower precedence there
as for citations, language design is still more of an art than a science :) 19:00
mauke it still feels wrong to me, like warning for "print (" instead of catching the general problem 19:01
TimToady which we also fixed in Perl 6
or at least made a different mistake
but the foundation of Perl 6 is to question everything that went before 19:02
PerlJam mauke: now you sound like me. I'm always "feeling wrong" about Perl 6 features :)
(though the recent addition of %/%% felt right out of the box) 19:03
mauke what does that do?
TimToady but there's a great deal of "invisible" design that goes into making errors detectable
19:04 perl_noob joined
TimToady we used to overload regex patterns 19:04
so x ** 1..5 was numeric quantification
but x ** ',' was by separator
perl_noob hy, would anyone tell me what happens when shift is used for assigning? like my $i = shift ??
TimToady "as long as there are commas, parse x"
we separated those into two notations
flussence rakudo: sub a { my $i = shift; say $i }; a(1, 2, 3) 19:05
p6eval rakudo db05a4: OUTPUT«Too many positional parameters passed; got 3 but expected 0␤ in sub a at /tmp/FHgIdpWgVC:1␤ in block <anon> at /tmp/FHgIdpWgVC:1␤ in <anon> at /tmp/FHgIdpWgVC:1␤␤»
TimToady which allows us to have both numeric and separators
PerlJam perl_noob: in perl 5, it shifts either @_ or @ARGV depending on where it's used
flussence rakudo: sub a(*@_) { my $i = shift; say $i }; a(1, 2, 3)
p6eval rakudo db05a4: OUTPUT«No applicable candidates found to dispatch to for 'shift'. Available candidates are:␤:(Positional @a)␤␤ in sub shift at src/gen/CORE.setting:4242␤ in sub a at /tmp/3LkA56OmGO:1␤ in block <anon> at /tmp/3LkA56OmGO:1␤ in <anon> at /tmp/3LkA56OmGO:1␤␤»…
flussence that's what happens, an error
TimToady and the %/%% will certainly feel somewhat wrongish since we picked something that was unlikely to resemble anything else you'd see in P6 regexes
mauke I'm actually a bit disappointed that perl6 still clings to regexes
perl_noob PealJam: it 's in the first line of a sub of a code i got here... it's just "my $j = shift;" and i cant figure it ouy 19:06
TimToady um, as opposed to clinking to what?
perl_noob out*
PerlJam clings?
flussence rakudo: sub a(Int $i, Str $j = '#', Bool $k = false) { say $i }; a(1, 2, 3) # better way of writing subs
p6eval rakudo db05a4: OUTPUT«Nominal type check failed for parameter '$j'; expected Str but got Int instead␤ in sub a at /tmp/WoXi0J6NsV:1␤ in block <anon> at /tmp/WoXi0J6NsV:1␤ in <anon> at /tmp/WoXi0J6NsV:1␤␤»
flussence rakudo: sub a(Int $i, Str $j = '#', Bool $k = false) { say $i }; a(1)
p6eval rakudo db05a4: OUTPUT«Could not find sub &false␤ in code <anon> at /tmp/P0jLtAOPxI:1␤ in sub a at /tmp/P0jLtAOPxI:1␤ in block <anon> at /tmp/P0jLtAOPxI:1␤ in <anon> at /tmp/P0jLtAOPxI:1␤␤»
TimToady the P6 regexs are far and away the most radical redesign feature of P6
flussence rakudo: sub a(Int $i, Str $j = '#', Bool $k = False) { say $i }; a(1)
p6eval rakudo db05a4: OUTPUT«1␤»
PerlJam mauke: regex are still a useful tool either way
TimToady we did keep *, +, and ? though 19:07
moritz mauke: in perl 6, regexes are much less essential for non-string code than in perl 5
TimToady just about everything else changed
mauke PerlJam: but they shouldn't be a core language thing
PerlJam mauke: why not?
TimToady sez who?
mauke this is my ass speaking
armchair language designer and all that 19:08
moritz jnthn: fwiw the optimizer branch makes the mandelbrot thing run in 43s; I've created a copy that uses a few more type annotations, and native int for the iterator variable... 32s
flussence oh, I meant to ask about the other *+?s...
19:08 thou joined
mauke I only have vague notions of what feels right and what doesn't, so don't take me too serious 19:08
TimToady we went the other way, P5 didn't actually make them a core language well enough
jnthn moritz: Not bad, not bad... :)
flussence should $obj.?multi die if none of the existing multis apply?
TimToady treating regexes as strings was Bad Design in p5
jnthn .? has nothing to do with multis
tadzik moritz: niecza is like 5 seconds, or is it?
jnthn It's about the method dispatcher. 19:09
flussence well that answers my question :)
mauke PerlJam: the language should be flexible enough to let you write regexes as a library
jnthn flussence: Well, back in b we flattened all the dispatchers out.
Then things changed.
TimToady and P6 is flexible enough to let you import any first-class language from the library, including regexes 19:10
tadzik I've never seen a language like that, so I'd think twice about the "should"
TimToady that doesn't force us to treat regexes as a second-class language as P5 does, or as a third-class language as Python does
mauke tadzik: depending on your definitions Haskell is that language
tadzik does it have first-class regexes, with stuff like $foo ~~ /bla bla/ or s/foo/bar/? 19:11
flussence TimToady: ooc, how does Python do them? strings?
PerlJam flussence: everyone (almost) does regex-as-strings
mauke tadzik: no, but I wouldn't call that first class 19:12
19:12 alvis joined
tadzik maybe I'm using the wrong words here, but I hope you see what I meant 19:12
moritz mauke: what does a feature need to be "first class", besides literals and the ability to pass them around as objects?
19:12 perl_noob left
tadzik basically, I meant "stuff like Regex.match() doesn't count" 19:12
mauke I'm thinking of parser combinator libraries like parsec 19:13
moritz: the ability to construct them at runtime, at least
to abstract over them
moritz [x] possible 19:14
tadzik C can do that
construct them at runtime, I mean
mauke C can't dance
it has no legs
TimToady the problem with most languages is that they force you to do it at runtime
tadzik yeah, but the standard dance.h can 19:15
TimToady and you end up with inferior runloop problems too
P6's approach is much more like Haskell combinators that can be compiled efficiently. 19:16
mauke what do you mean? less efficient execution because they're no special language support?
TimToady you can do things at run-time, but you're not forced to
mauke er, not "they're"
19:17 alester joined
mauke gut feeling again: if something isn't efficient enough, it's preferable to improve the compiler until it is, instead of pulling the feature into the core language 19:18
PerlJam your gut is weird. 19:19
mauke (I realize that this is vague and not always possible)
PerlJam "pulling a feature into the core language" is all about expressivity and making things easier for the programmer to get work done.
moritz mauke: lisp exists :-)
mauke PerlJam: I'd say it's the opposite 19:20
depends on how exactly it's done, though
TimToady so you'll maintain an artificial distinction between languages you use as a native speaker, and languages you can't actually use direclty, but just think about using at one remove?
that's how most languages treat regex language
you have to handle regexes with tongs all the time
moritz despite all wishes otherwise, perl 6 is not a minimalist language, and won't be one 19:21
19:21 thou left
im2ee How goes Your day? :) 19:21
TimToady Perl 6 is about saying what you mean, not about talking about saying what you mean
that's why it's given/when, not switch/case
mauke heh
I hope perl6's version is better than perl5's
PerlJam TimToady: I think you've hit the anil on the head. mauke is probably one of the people who *wants* to handle regex with tongs all the time. 19:22
TimToady p5 tried to cargo cult the syntax without the type system to carry it off correctly
19:23 Vlavv` left 19:24 Vlavv` joined
PerlJam mauke: do you find regex an icky intrusion in your otherwise nice perl code? 19:24
mauke hah, no
everyone knows there is no such thing as "nice perl code"!!!1 19:25
PerlJam heh
I think I've generally assumed that most other perl-people have a similar relationship with Perl as I do. Clearly this is not the case.
mauke but given that I'm the author of mauke.dyndns.org/stuff/perl/ccomm.pl and use regexes all the time ... no, not really
TimToady P5 only pretends to make regex into a real language, but underneath it's all still strings, and that's where nearly all the problems arise, from double-parsing and inferior run-looping 19:26
mauke I think I agree 19:27
TimToady turning it into real language allows us to pick the correct defaults on how variables are treated, rather than forcing string interpolation semantics
PerlJam double parsing rears its ugly head everytime someone uses a $variable in a regex. How many of those questions does #perl field in a given week? 19:28
TimToady so vars always match literally in P6
no more need for \Q...\E
tadzik so eskimo shouldn't work? :)
TimToady eskimo won't work; you'll have to cheat some other way :)
mauke just the other day I was thinking about what an "ultimate regex library" would look like
PerlJam mauke: perl 6? :) 19:29
mauke does perl6 let me match other things than strings?
TimToady you realize the Perl 6 parser is written in Perl 6 regexes?
tadzik :)
PerlJam mauke: yes
tadzik that's the *WHAM* moment
mauke TimToady: I've heard about it but I don't really know what perl6 actually looks like 19:30
m6locks ;)
mauke PerlJam: can it give me more information about a match than just "matched" / "didn't match"? particularly "matched but could potentially match more if the string was longer" and "didn't match but could potentially match from offset X if the string was longer" 19:31
tadzik ew 19:32
19:32 kshannon left
moritz mauke: there's a .moreinput mechanism in STD which lets you provide a longer string whenever the regex engine examines the end of the string 19:32
TimToady in what units are you defining offset X?
PerlJam mauke: that part is a bit underspecced, but I believe the answer is yes to those as well.
mauke TimToady: bytes, because I was thinking in C 19:33
19:33 sivoais left
TimToady yes, well, we've got a slightly more nuanced view of the various possible definitions of "character" here 19:33
19:33 ruoso left 19:34 kshannon joined
TimToady but for various definitions, there will likely be a way to do it 19:34
mauke I have a very specific use case for this feature and it involves a pty, so it really is bytes
TimToady do you expect to match any non-ASCII characters?
19:35 ruoso joined
mauke good question 19:35
maybe
TimToady then you may need to know a bit more than just where the bytes are 19:36
mauke what do you mean?
moritz if it's "ultimate", I'd rather hope it could match > 127 :-)
PerlJam mauke: See, that's what Perl 6 needs; people who have specific use-cases that someone can write an implementation for features against. that way we vet the spec and get an implementation out of the deal :)
mauke moritz: of course it could, but most urls are ascii 19:37
does perl6 do continuations?
TimToady but what encoding is your pty returning characters in? and do you know for sure, or are you just guessing from an env var? 19:38
mauke TimToady: neither, I'm guessing from the bytes
and the guess will probably be "try utf-8; if that fails, give up"
TimToady Perl 6 the language does not mandate continuations, though it can be implemented in terms of them 19:39
in fact, that's the case on parrot
benabik No call/cc in p6? 19:40
PerlJam mauke: were you asking if continuations were exposed to the Perl 6 programmer?
TimToady not all platforms can supply continuations easily, so it would be implementation dependent on whether they are available on a language level
19:40 sivoais joined
mauke I mean as a userspace feature. "hey, let's suspend this execution and get back to it later" 19:40
TimToady we expose such behavior more by use of lazy lists 19:41
mauke I'm asking because moritz mentioned the ability to extend the target string on the fly while matching
that's only half of the functionality
[Coke] TimToady: ah, sorear had a question for you about the stringification of ranges.
mauke I also want to suspend the regex matcher and get back to it later 19:42
[Coke] perl6: say ~(1..6)
p6eval pugs, rakudo db05a4: OUTPUT«1 2 3 4 5 6␤»
..niecza v10-17-g8fdba33: OUTPUT«1..6␤»
moritz given the existance of (1...6), I'm much less oppose to niecza's stringification as I would have been some time ago 19:43
[Coke] perl6: say ~(1...6)
p6eval rakudo db05a4, niecza v10-17-g8fdba33: OUTPUT«1 2 3 4 5 6␤»
..pugs: OUTPUT«*** ␤ Unexpected "6"␤ expecting operator or ")"␤ at /tmp/E0KHWH7uIJ line 1, column 11␤»
TimToady and .. is supposed to primarily represent an interval, not a list 19:44
flussence pugs: say ~(1...)
p6eval pugs: OUTPUT«Stack space overflow: current size 8388608 bytes.␤Use `+RTS -Ksize -RTS' to increase it.␤»
flussence :(
[Coke] hee!
mauke ah, good old ghc
[Coke] gives flussence a cookie!
TimToady: so you're cool with it stringifying to the range itself? 19:45
If you change the spec, I will update the spec tests. (and then fudge niecza & rakudo to deal with it.)
(... or fix rakudo, i suppose.) 19:46
TimToady niecza: print 1..6
p6eval niecza v10-17-g8fdba33: OUTPUT«1..6»
TimToady that, however, is wrong, since a range should iterate in list context
tadzik masak: what was the presentation software we were using for LAF? 19:47
[Coke] hates the new print/say dichotomy. :P
jnthn hates the new print/say dichotomy. :P
[Coke] is pretty sure it doesn't impact the stringification used in the tests, though. 19:48
jnthn ...does anybody like it? :)
masak tadzik: Failure.
masak hates the new print/say dichotomy. :/
arnsholt There's a dichotomy between print and say?
tadzik I hate it too!
masak: in which repo does it live?
masak tadzik: github.com/masak/failure
PerlJam arnsholt: say isn't print + "\n"
tadzik kthx
. o O ( failure lives in all my repos ) 19:49
arnsholt Aha. What's the difference between the two?
masak tadzik: I have found a correlation between derogatory project names and longevity of projects. so "failure" was the name I chose.
diakopter heh 19:50
flussence
.oO( "PHP" )
moritz kinda likes that there are different stringifications, but isn't sure that the print/say distinction is the right trigger
tadzik arnsholt: they stringify stuff differently
masak moritz: I'm pretty sure the print/say distinction isn't the right trigger.
flussence I tried to $io.write($str) the other day... 19:51
tadzik :P
arnsholt Oh. I think I can get behind not liking that
moritz nom: $*OUT.write('foo')
p6eval nom db05a4: OUTPUT«Nominal type check failed for parameter '$buf'; expected Buf but got Str instead␤ in method write at src/gen/CORE.setting:5008␤ in block <anon> at /tmp/LoKfzWwLbV:1␤ in <anon> at /tmp/LoKfzWwLbV:1␤␤»
diakopter hm 19:52
PerlJam masak: would a different verb help?
TimToady it's pretty easy to define a println if you want it 19:53
[Coke] hey, for rakudo, do we want to add ALL the spectests to t/spectest.data in commented out form?
moritz [Coke]: nope
PerlJam TimToady: yeah, but I think one of the reasons say was so well liked was because so many people wanted exactly that. :)
19:53 ingy left
moritz [Coke]: only those we're supposed to pass, for some values of "supposed" 19:54
TimToady before they knew they wanted gitsts
*gists even
[Coke] moritz: not even at the bottom undernearth all the ones we do run? ;)
moritz: we're supposed to pass all of them. ;)
moritz [Coke]: for some other value of "supposed" :-) 19:55
19:55 sunnavy left, athomason_ left
masak TimToady: I'm not advocating adding more ways to print stuff, just consistency between the ways we already have. 19:55
19:56 sunnavy joined
TimToady I see little use for consistency here, and more use from differentiating features that are "too close" 19:57
much as we made -M very different from mtime in p5
diakopter maybe TimToady was suggesting "you" "define" "println" in CORE.setting ;)
[Coke] moritz: some of the stuff in rakudo/tools could move to roast. (like test_summary.pl, autounfudge). easier to share between projects, then. (which would be helpful for niecza)
PerlJam heh
19:57 ingy joined
moritz [Coke]: +1 19:57
[Coke]: though you should talk to mberends++ about test_summary.pl
[Coke] moritz: k. I'll look at that later.
moritz update_passing_test_files.pl could also move 19:58
[Coke] he was happy to see it being used on niecza. I think that's a +1. ;)
TimToady and "println" would suggest much more consistency with "print" than "say" would :P
PerlJam We could use "p" like Data::Printer does ;)
diakopter perl6: say list 1..6 19:59
p6eval rakudo db05a4: OUTPUT«1 2 3 4 5 6␤»
..pugs: OUTPUT«123456␤»
..niecza v10-17-g8fdba33: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'list' used at line 1␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤…
diakopter perl6: print list 1..6
p6eval pugs, rakudo db05a4: OUTPUT«123456»
..niecza v10-17-g8fdba33: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'list' used at line 1␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤…
masak I dislike the splitting up of semantics into a thousand different little aspects. we shouldn't have three methods for getting truth values. we shouldn't have four and a half types representing lists. we shouldn't have print and say going off to different stringification routines. I shouldn't have to stress this. :( 20:00
20:00 athomason joined 20:01 kaare_ left
masak I know that the world contains lots of essential complexity, but most of the above feels like putting accidental complexity into the design. 20:01
I'm against that.
diakopter some kitchen sinks are very complex, and people pay for them
tadzik masak: do you have the 'slides' file which LAF was generated from? 20:02
PerlJam masak: I don't think it's accidental complexity at all, but I also don't necessarily disagree with you either.
masak tadzik: github.com/masak/talks/blob/master...arm/slides
tadzik thanks
20:03 mj41 left
PerlJam masak: I also have no good answers, so I punt to TimToady and hope his brain can sort it out better than mine. 20:03
masak PerlJam: here's why it *is* accidental complexity. Perl 6 class, explain 'print' and 'say'. teacher goes 'say = print + \n'. done. everything else is overly complex.
TimToady so everything should be one different from everything else, eh?
masak I don't think that's what I'm saying. 20:04
PerlJam masak: That sounds like "we had a simple rule and now it's not, ergo accidental complexity"
masak I'm saying I thought it was beautiful and easy when print and say were one different.
PerlJam: yes!
PerlJam masak: I don't buy that.
masak because the simple rule was obviously the right one.
jnthn struggles to see why what masak's saying isn't obvious too, fwiw. 20:05
masak and the current rule... I would say it sucks, but I can't even *explain* the difference yet. :(
this just makes me a bit sad and angry. :(
jnthn Violates the principle of least surprise too.
PerlJam masak: that it sucks ... *that* I can agree with entirely.
20:05 athomason left
jnthn It surprised me to the degree that I almost just went and fixed print in Rakudo, assuming it was a bug. 20:05
[Coke] anyone have a link to spec explaining how they differ? 20:06
masak apparently jnthn and I were the only two not affected by the Reality Distortion Field, being too busy with NPW...
moritz ack for gist
20:06 sunnavy left
[Coke] perlcabal.org/syn/Differences.html#say() is wrong. 20:07
jnthn I like that we differentiate .gist and .Str. That's solved problems. But making say call .gist and print call .Str is creating a new problem.
masak [Coke]: looks good to me.
20:07 sunnavy joined
masak jnthn: exactly. 20:07
jnthn Plus you can get the other (Str) meaning with one char. 20:08
say ~$thing; print ~$thing;
masak +1
jnthn If you happen to really want it.
20:08 ingy left, ingy joined, athomason joined
masak please make it so. 20:08
[Coke] .gist says that say calls .gist (say should say that say calls .gist), but doesn't say what print calls in place of .gist 20:09
TimToady so make print call .gist like say, and then add a "print-yes-I'm-really-printing-to-a-device-not-a-human" function
jnthn TimToady: +1 20:10
TimToady output 1..6
PerlJam TimToady: that sounds good to me 20:11
masak write :)
TimToady write would be okay 20:12
20:12 sunnavy left
masak IO already has .write 20:12
TimToady but does it take a list?
masak dunno.
TimToady is probably a STDIO-alike
20:12 sunnavy joined
PerlJam normally "write" is the opposite of "read", what's the opposite of "print" or "say" ? 20:13
(do they have an input counter part?)
TimToady prompt
masak PerlJam: "subscribe" or "listen" :P
PerlJam There's no separate newline-preserving and newline-removing routines? 20:15
masak ISTR lines() has a named controlling newline strippage. 20:16
TimToady there are no nl-preserving defaults
20:17 ilogger2 joined, ChanServ sets mode: +v ilogger2
masak and it was only ever on the callee side anyway. 20:17
flussence yeah, that's what I was trying to get it from... 20:18
PerlJam TimToady: so ... why have print at all? why not something like say :raw "lah" ?
masak (TTIAR)
20:19 bbkr joined
PerlJam (:raw is a bad name, but aside from that...) 20:19
TimToady primitives should not be modified forms of complex operators
flussence rakudo: sub infix:<@@>($a, $b) { say "$a $b" }; 1 @@ 2; 20:23
p6eval rakudo db05a4: OUTPUT«===SORRY!===␤Confused at line 1, near "1 @@ 2;"␤»
flussence b: sub infix:<@@>($a, $b) { say "$a $b" }; 1 @@ 2;
p6eval b 1b7dd1: OUTPUT«1 2␤»
flussence something broke...
recently, too
moritz flussence: yep, operator overloading is NYIA in nom 20:24
flussence hm, oh well
b: sub infix:<as>($value, $type) { $value.$type }; print False as Int 20:25
p6eval b 1b7dd1: OUTPUT«invoke() not implemented in class 'Integer'␤ in 'infix:<as>' at line 22:/tmp/ZZaCQZn9tT␤ in main program body at line 22:/tmp/ZZaCQZn9tT␤»
moritz b: sub infix:<as>($value, $type) { $value."$type"() }; print False as Int 20:26
TimToady but I'm more inclined to leave print as primitive, since that's how it is in Perl 5, and introduce something that indicates "presay" or something that means what you say before you're going to say what you're going to say
p6eval b 1b7dd1: OUTPUT«Method 'Int()' not found for invocant of class 'Bool'␤ in 'infix:<as>' at line 22:/tmp/2pHlJB38e2␤ in main program body at line 22:/tmp/2pHlJB38e2␤»
mauke so I was reading about smart match and I'm not sure it's better than the perl5 version 20:27
20:27 tokuhiro_ joined
mauke from the description it looks like I still don't know what 'given ($foo) { when $bar {} }' will do 20:27
TimToady and you'll almost never see such a when statement 20:28
moritz mauke: about the same as if $foo ~~ $bar { }
mauke yeah, same problem 20:29
TimToady which you wouldn't write unless you knew $bar made sense as a pattern
mauke if I knew what $bar was, I could use a more specific operator
moritz mauke: if you don't know what your variables contain, and they have as descriptive names as $foo and $bar, you do have a problem
TimToady you can't just use ~~ as a synonym for == or eq or === or eqv and expect to get away with it
"Doctor, it hurst when I do this..." 20:30
flussence rakudo: my $foo = 'abc'; my $bar = rx/a/; $bar.ACCEPTS($foo).perl.say
p6eval rakudo db05a4: OUTPUT«Match.perl(orig => "abc", from => 0, to => 1, ast => Mu, list => ().list, hash => EnumMap.new())␤»
TimToady "Well, obviously you need to drink less, since you can't pronounce 'hurts'" :)
mauke perl6 is all about making it harder for users to hurt themselves
TimToady but not impossible 20:31
mauke that's why ?? !! has weird parsing rules :-)
TimToady it's a balancing act
mauke I accidentally read about loop constructs as well
jnthn The whole of loop constructs?
mauke is there a way to do something like: repeat { my $x = foo(); } until $x; ?
jnthn TimToady: While you're about...what does ::Foo::Bar actually mean in a term context? 20:32
TimToady yes
repeat until my $x { $x = foo() }
jnthn TimToady: Does it mean "try to look this think up at runtime, and assume it's a type"?
mauke haha, ouch
TimToady works fine
jnthn s/think/thing/
mauke that is deliciously evil 20:33
jnthn TimToady: And if it's something we need to know at compile time we whine "can't do"?
diakopter niecza: repeat until my $x { $x = say 3 }
p6eval niecza v10-17-g8fdba33: OUTPUT«3␤»
mauke (also, I think I understand the objections to Data.Default (Haskell) now) 20:34
thanks for the discussion, btw 20:36
moritz jnthn: fwiw it seems I don't understand constants code generation well enough to fix the Inf thing in optimizer 20:39
jnthn: I think it might need fixing in SymbolTable.add_numeric_constant or so, but I'm far from sure 20:40
TimToady jnthn: yes, that's about all :: does, not much more than the stubbing you get on Foo::Bar::baz 20:45
jnthn moritz: I'm just building it now to see what the test fallout is and ahve a look. 20:51
TimToady: OK, thanks.
dalek ast: bc6a795 | moritz++ | S03-operators/lcm.t:
test for [lcm] Range
20:54
ast: e20ead4 | moritz++ | S05-grammar/inheritance.t:
fudge a grammar test
ast: b5503f3 | moritz++ | S14-roles/mixin.t:
test for mixing into a Rat, RT #99986
20:57
jnthn moritz++ # knocking down the testneeded queue a bit 20:58
btw, I think there is plenty more "fixed in nom" to go in the queue.
sjohnson internet 21:00
masak that's us. hi.
dalek ast: f7a7b76 | moritz++ | S03-operators/buf.t:
test Buf concatenation
sjohnson masak++ 21:01
jnthn Apart from in Latvia, and then we're "internets"
diakopter who says interwebs
or intertubes 21:02
moritz nom: my @a = a => 1, b => 2; say @a.perl; say @a.hash.perl; say @a.perl;
p6eval nom db05a4: OUTPUT«Array.new("a" => 1, "b" => 2)␤("a" => 1, "b" => 2).hash␤Array.new("a" => 1, "b" => 2)␤»
moritz diakopter: for me it's the "interblah"
jnthn So long as you don't mistake it for a truck, it's all good.
dalek ast: 8791b90 | moritz++ | S02-types/array.t:
tests "for Array.hash eats itsef" bug, RT #95850
21:04
jnthn moritz: wow, it does rather decimate the spectest suite, doesn't it... :) Working on a fix. :) 21:06
moritz jnthn: that's what I meant with "havoc", even though I spelled the verb wrongly :-) 21:07
dalek ast: 5fb50bc | moritz++ | S03-operators/range.t:
test "a".."z", RT #95692
21:08
ast: 391661a | moritz++ | S02-types/subset.t:
test for subse type with any(), RT #95500
21:11
moritz down to 843 open perl6 tickets. masak, that's a challenge :-)
masak challenge ACCEPTED.
jnthn oh my, I really wanted to get sub-800 :P 21:12
.oO( mwaha...I can file tickets about macros soon! ;) )
moritz rakudo: my $a = 1, 2, 3; $a = $a.grep({1}); say $a.perl
p6eval rakudo db05a4: OUTPUT«(1,).list.item␤»
moritz that's wrong, isn't it?
{1} always returns a True value
moritz -> sleep 21:13
jnthn rakudo: my $a = 1, 2, 3; $a = $a.grep({say 'waz ere'; 1}); say $a.perl
p6eval rakudo db05a4: OUTPUT«waz ere␤(1,).list.item␤»
jnthn er...hm.
moritz: er
moritz: item assignment :)
moritz oh
right
rt.perl.org/rt3/Ticket/Display.html?id=93972 jsut needs a test then :-)
rakudo: my $a = (1, 2, 3); $a = $a.grep({1}); say $a.perl
p6eval rakudo db05a4: OUTPUT«(1, 2, 3).list.item␤»
jnthn moritz: And before you sleep, other good news 21:14
moritz: I have a patch that fixes the spectets for Inf/NaN issues :)
I guess we're not allowed a +/- in features for "native operators" until the branch merges though :)
dalek kudo/optimizer: 7bc5ce7 | jnthn++ | src/Perl6/SymbolTable.pm:
Fix Inf/NaN in native num contexts.
21:16
jnthn wonders what next for optimizer... 21:20
Though I should probably worry about other things too :)
nom: sub foo() returns(int) { } 21:27
rakudo: sub foo() returns(int) { }
rakudo: say "alive"
... 21:28
niecza: say 42
21:28 mkramer joined
jnthn oh, no parens... 21:28
21:29 diakopter left, diakopter joined
p6eval nom db05a4: OUTPUT«===SORRY!===␤Malformed block at line 1, near "returns(in"␤» 21:29
rakudo db05a4: OUTPUT«===SORRY!===␤Malformed block at line 1, near "returns(in"␤»
rakudo db05a4: OUTPUT«alive␤»
niecza v10-17-g8fdba33: OUTPUT«42␤»
21:30 sorear joined, mkramer left
diakopter hunh; big delay from p6eval 21:32
jnthn yeah, my build finished and I could do it locally before p6eval got back to me :P 21:33
masak .oO( p6eventually ) 21:35
diakopter cpu/mem on host04 are fine; seems like network problems at the hostring providrer 21:36
better now
masak nom: say "better now?" 21:37
p6eval nom db05a4: OUTPUT«better now?␤»
masak aye.
im2ee Time to go! Good night o/ :) 21:40
21:41 y3llow joined, pothos_ joined 21:42 pothos_ is now known as pothos 21:43 y3llow left, y3llow joined 21:44 pothos left, pothos_ joined 21:45 y3llow left 21:46 pothos_ is now known as pothos, y3llow joined 21:49 ab5tract joined
masak 'night, #perl6. 21:55
22:00 [Coke] joined 22:05 gfldex left
diakopter niecza: sub postfix:<!> { [*] 1..$^n }; say 78! 22:07
p6eval niecza v10-17-g8fdba33: OUTPUT«11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000␤»
22:08 ab5tract left
diakopter niecza: sub postfix:<!> { [*] 1..$^n }; say 1000! 22:11
p6eval niecza v10-17-g8fdba33: OUTPUT«4023872600770937735437024339230039857193748642107146325437999104299385123986290205920442084869694048004799886101971960586316668729948085589013238296699445909974245040870737599188236277271887325197795059509952761208749754624970436014182780946464962910563938…
diakopter niecza: sub postfix:<!> { [*] 1..$^n }; say (~1000!).chars 22:12
p6eval niecza v10-17-g8fdba33: OUTPUT«2568␤»
22:18 Fuad joined
dalek kudo/optimizer: 2cf8944 | jnthn++ | src/core/Int.pm:
Start to add some returns traits to various ops. Also a couple more native int ops.
22:18
kudo/optimizer: c085ef9 | jnthn++ | src/Perl6/ (3 files):
If we know what we're going to call, add its return type into the tree, so things a level up can use that type in their analysis. This means that given ($a, $b, $c) are all int, $a + $b * $c will be able to inline both operations; before it would not inline the +.
Fuad hello 22:19
diakopter hello
jnthn: in perlesque I had to add a non-spec facility so closures could be passed around *strongly-typed*, so their type signatures could appear in a function's signature... is there a spec'd way to strongly-type such closure arguments to Perl 6 functions? 22:21
... and will your optimizer know what to do with such things? :) 22:22
jnthn I thought your work in that area led to something getting spec'd in S06 along those lines? 22:23
&foo:(sig goes here) or some such.
I don't have that in place yet, anyway. 22:24
When I do, yes, it'll be there for the optimizer to consider.
diakopter jnthn: istr something like that, I'd forgotten. :) 22:26
jnthn I guess you were annotating the closures too?
-> Int $a --> Int { ... } or some such?
diakopter frankly I've forgotten
jnthn ok :) 22:27
diakopter my memory is abysmal
oh yeah; I set up a parsetime macro-ish typedef 22:28
the argument types directly corresponded to .Net routine signatures 22:29
jnthn: any idea where that was in S06; I'm failing 22:37
jnthn 314 22:38
diakopter oh hm there it is
jnthn realizes that if you know you have a junction, you can probably figure out a lot of junction dispatcher failovers at optimize time, and not have to fail over. 22:50
(Just go straight to the junction dispatcher.) 22:51
22:55 Chat8299 joined
Chat8299 hola 22:55
tadzik hello, fellow chatmosphere user 22:57
22:58 Chat8299 left
jnthn Well, thankfully that was less eventful than usual. :) 22:59
tadzik yep :)
23:00 Fuad left 23:01 bbkr left 23:02 bbkr joined 23:08 bluescreen10 joined 23:11 szbalint joined 23:14 stepnem left
dalek kudo/optimizer: f7344b1 | jnthn++ | src/Perl6/Optimizer.pm:
Little refactor in preparation for analyzing only calls further.
23:14
kudo/optimizer: ea3e344 | jnthn++ | src/ (3 files):
Some initial infrastructure for trial-binding calls to only subs.
kudo/optimizer: 8c0c759 | jnthn++ | src/Perl6/Optimizer.pm:
Update optimizer so that it can start making some use of the only-sub trial bind analysis, once it's implemented (at the moment, it always gets 'not sure' though, and does no transformation).
felher moritz++, jnthn++ for all that hacking on optimizer and nom lately, pmichaud++ for action methods <3. And ++ to all the ones i don't remember just now :/ 23:15
felher -> sleep
23:18 ranguard joined, Tene joined, Exodist joined 23:20 whiteknight joined 23:22 espadrine joined 23:23 [Coke] left 23:24 [Coke] joined 23:29 buubot_backup left 23:47 soh_cah_toa joined 23:49 buubot_backup joined 23:51 benabik joined 23:54 stepnem_ joined 23:56 molaf_ joined