»ö« 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.
dalek ecza: 84360d1 | sorear++ | lib/ (3 files):
No more "ModuleWithTypeObject", everything gets a type now
00:07
kudo/nom: 7c0bd49 | jnthn++ | src/ (2 files):
Some infrastructure for booleanization, and a very very cheating Bool, pending figuring out how to write EnumHOW.
kudo/nom: 4d39aa6 | jnthn++ | src/CORE.setting/operators.pm:
First few relational ops.
kudo/nom: 4ac71a8 | jnthn++ | src/Perl6/Actions.pm:
Get if/unless/while and maybe some others working again.
00:07 noganex_ joined
sorear jnthn: Is knowhow a mandatory part of Perl 6, or just reserved syntactic space for implementations that need it? 00:09
jnthn sorear: I've been pondering that. It made it into std as a result of smop, I think. 00:10
sorear: I'm not sure that it's a great name.
00:11 noganex left
jnthn And it's not really defined anywhere in the spec. 00:11
dalek kudo/nom: 63185a7 | jnthn++ | src/CORE.setting/operators.pm:
Few more relational ops.
00:17
00:26 jfried left 00:40 cooper|ipad left 00:44 lumi left 00:45 lumi joined
sorear TimToady: What does enum <variable> <a b c> mean? Why does STD accept a variable instead of a longname here? 00:51
TimToady an enum is just a constant mapping, and we allow other constants to go into names with or without a sigil 00:55
00:56 lue joined
sorear ah 00:56
makes sense
after 'enum $foo < a b c >', can $foo('a') be accessed directly?
I presume not 00:57
TimToady $foo<a> maybe
sorear S12:1983 talks about how, after enum A < b c >, A responds to postcircumfix:<( )> while b and c don't 00:59
Is this a fossil from back when type objects had their own types? (Enum vs. A)
TimToady: 01:02
dalek kudo/nom: aa75145 | jnthn++ | src/binder/multidispatch.c:
Fix a multi-dispatch bug.
01:04
kudo/nom: dbbe49f | jnthn++ | src/Perl6/Metamodel/ClassHOW.pm:
Publish type check cache.
01:04 icwiener_ joined
TimToady could be; enums have historically been overengineered in several directions, so we should aim for the simplest thing that gets people from point A to point B 01:06
01:07 icwiener left
TimToady main thing is that they still have to introduce the individual symbols when that's desired 01:08
01:17 cdarroch left 01:22 lumi left 01:23 lumi joined 01:26 jferrero left 01:52 donri left 01:53 whiteknight left
dalek kudo/nom: 63ff94c | jnthn++ | src/binder/container.c:
Couple of write barriers.
02:11
kudo/nom: 539761b | jnthn++ | src/binder/bind.c:
A little binder cleanup and optimization.
kudo/nom: 02d3637 | jnthn++ | src/Perl6/Actions.pm:
Little optimization for compiling primitive multis.
kudo/nom: aaf51d0 | jnthn++ | NOMMAP.markdown:
Update nommap.
02:12 woosley joined
jnthn Let's try sleep again... & 02:13
02:15 Chillance left 02:21 lumi left, lumi joined 02:26 mtk left 02:37 mtk joined 02:48 nymacro joined 03:05 hudnix left 03:10 lumi left 03:11 lumi joined 03:23 Su-Shee_ joined 03:26 Su-Shee left 03:29 envi joined 03:48 thou joined 03:52 lumi left 03:54 lumi joined 03:55 lue left 04:38 wamba joined
sorear wonders how much sense taint mode makes in Perl6 04:44
05:02 lumi left 05:25 mberends joined 05:28 molaf joined 06:00 am0c joined 06:12 daniel-s joined 06:18 daniel-s left 06:24 [Sec] left 06:25 daniel-s joined 06:29 kaare__ joined
sorear bah. horrible unproductive day. ->sleep 06:35
daniel-s good night 06:38
06:39 mberends left 06:42 mberends joined 06:58 kaare__ left 07:00 wamba left 07:12 tadam joined 07:17 benabik left 07:19 awoodland joined 07:40 hanekomu joined 07:42 Tedd1 joined 07:43 envi left 07:48 jjore left 07:49 mj41 joined 07:51 jjore joined 07:53 tadam left 07:56 cooper|ipad joined 07:57 thou left 08:06 envi joined 08:08 Su-Shee_ is now known as Su-Shee 08:09 mj41 left 08:10 cooper|ipad left 08:24 pernatiy_ joined 08:25 pernatiy left 08:27 masak joined
masak morning, #perl6. 08:28
tadzik morning masak
masak g'ah! I forgot to edublog yesterday! :/
mberends morning, masak
masak makes up for it now
08:28 araujo left 08:30 lateau joined 08:34 lateau left
mberends masak: I'm looking forward to your edublog teaching Perl 6 to my wife and son :) 08:34
masak mberends: cool. 08:35
mberends: I really wish the "environment" for toying around with BASIC code and the like that existed when I was a kid hadn't gone away.
mberends aye 08:36
I'm also try to re-kindle that with Arduino. Also, this morning Click on BBC World featured www.raspberrypi.org/ 08:37
08:38 tadam joined
moritz would love a p6 repl with easy graphic output 08:43
08:43 tadam left
tadzik did I hear kindle? :) 08:45
mberends hi tadzik, no you didn't :)
tadzik :>
I find the device quite tempting 08:46
08:46 zby_home_ left, envi_|2 joined
mberends people do hack 'em, but only in minor ways apparently 08:46
08:46 Mowah joined 08:50 envi left
masak I recently showed my twin cousins how to write simple stuff in QBasic. even getting QBasic to run is *far* too tricky nowadays. 08:55
tadzik I think amazon is close to releasing an SDK for it
masak (I have a 64-bit Windows installation, so I needed DOSBox to get it to run. DOSBox uses the concept of "mounting directories onto disk drive letters" to get going.) 08:56
blog post! strangelyconsistent.org/blog/june-3...statements 08:57
mberends yay!
moritz *else say that it's just right. 08:59
looks like a markup glitch 09:00
masak aye; saw that after publishing. it's already in the pipeline. :)
thanks.
oh! I forgot to mention the braces. I should do that briefly, too.
Su-Shee
.oO(smalltalk... :)
09:01
masak what about smalltalk? 09:02
Su-Shee repl with gui and easy to learn/teach and so on.
masak ah, yes. 09:03
Squeak seems nice in many ways.
as does the Lively kernel.
Su-Shee masak: grown-ups use "Pharo" mostly. (and I don't mean it in a sarcastic way)
masak oh, ok. haven't heard about Pharo. 09:04
I do have a CD here with software from Cincom that I got at a set of Smalltalk lectures once.
Su-Shee I have to say I'm absolutely amazed by Smalltalks.. the smoothsness, the level of integration, image-based, the very well written docs, the educational aspect.. 09:05
it really merges OO, gui, programming into one smooth flow of use. amazing stuff. 09:07
masak I've always been impressed by that class navigator thing. 09:09
Su-Shee masak: imagine writing code, the gui and the documentation being on the same level of usability. 09:10
it's really basically "hack as you go, oh wait, I want a button here just now..."
masak :)
Su-Shee no, I really mean it. This is a whole new level of hacking away and being productive.. 09:11
masak shame there's that monad-like echo chamber effect going on where a lot of nice things go into Smalltalk, but they never come out again. :/
Su-Shee the community interested in smalltalk is too small, usally it's only people who went for the OO aspect of Ruby or come from the GUI world (like me) - and that's only a few people... 09:12
most developers go for functional languages...
a friend of mine really did take smalltalk and tought 8-10 year old girls with it.. it's amazing what children can hack if you give them the right environment... 09:13
masak aye. 09:15
and it must be great to *be* a kid with the right environmant, too. 09:16
Su-Shee well set aside that my personal future doesn't lie in moving a green turtle on the screen (the hello world of smalltalk) it's amazing to have an environment which is optimized for all technical consequences moving a green turtle implies.. 09:17
like "move this object, change its attributes on the fly, connect events to it" and so on... 09:18
moritz speaking of such environments, polycode.org/ is just high on reddit 09:20
Su-Shee ah. *click* :)
masak looks like a very nice project. 09:26
shopping & 09:29
09:35 nymacro left 09:36 daniel-s left, cglr joined 09:38 MayDaniel joined 09:40 awoodland left 09:52 jfried joined 09:56 cglr left 10:05 MayDaniel left 10:15 mtk left 10:20 daniel-s joined, woosley left, daniel-s left, daniel-s joined 10:23 buubot_backup left, hanekomu_ joined, whiteknight joined 10:25 mtk joined 10:27 hanekomu left 10:34 hanekomu_ left, hanekomu joined
jnthn o/, #perl6 10:43
tadzik hello jnthn 10:49
jnthn hi tadzik :) 10:50
jnthn got decent sleep, when he finally managed to lose conciousness. :)
Plan: coffee. bacon. hack.
10:51 noam joined
tadzik nice 10:51
nom needs like 4 seconds to calculate the sum from 1 to 100000. I think it was like 40 for Rakudo, but I may be wrong 10:52
jnthn tadzik: What code are you using for that, ooc? 10:54
tadzik jnthn: some stupid "speedtest.nqp" thing from my ~/src/perl/perl6, will paste somewhere 10:55
wklej.org/id/540720/ 10:56
mberends o/ jnthn. Almost on topic, I am trying to get my biggishint lib in shape to be a zavolaj example
jnthn tadzik: ah, using binding. OK :) 10:57
tadzik binding is supposed to be slow?
jnthn No, binding is quite fast now.
However, LOADS of other stuff is still far from optimized. 10:58
As in, I've got a long list of reasons why that code takes as long as it does to run.
tadzik 8 seconds with assignment
I've examined the pir, and it's full of nqp_something_something_serialization_something 10:59
jnthn Yes :) 11:00
11:01 zermatts joined
jnthn Well, generally you'll find one huge-ish deserialization sub 11:01
But then the body will also do a load of that
tadzik yeah
jnthn It's the 10000
We don't create it every time now
We make it once then look it up
11:01 JimmyZ joined
tadzik 10000 times? :) 11:02
I see the point. Also, the 1, no?
jnthn tadzik: Yes, which isn't really ideal in a sense, but is still WAY faster than what master does (which is make 10000 instances of Int).
Right, same for the 1.
tadzik also, isn't ++ an LHF? 11:03
jnthn Probably.
tadzik s/an/a/ I think
jnthn oh
Not sure that "is rw" works properly yet but maybe enough
tadzik after modifying operators.pm make says Nothing to be done for `all'. 11:06
11:06 araujo joined
jnthn huh. 11:06
:/
tadzik: Can you check the makefile? 11:07
tadzik I can, but my Makefile-fu is weak
11:09 cognominal joined
tadzik I do like commits like this one 11:20
dalek kudo/nom: 79f3713 | jnthn++ | src/ (2 files):
Realized in the shower that for an onlystar block entering a multi-dispatcher, we don't need a new callframe, we can just use the perfectly good one that we already have. Did it. 30% speed win on operator calling heavy benchmark.
moritz \o/ 11:21
tadzik imagines jnthn having a commit-terminal inside the shower cabin
a perfect hack, you never know when it will come to your mind 11:22
moritz that's what memory is for :-)
www.reddit.com/r/programming/commen...ets_right/ 11:27
11:27 hanekomu left 11:37 buubot_backup joined
jnthn checks the nommap and gets hacking 11:41
11:42 donri joined 11:44 pmurias joined 11:55 noam left 11:56 kaare__ joined 11:59 pmurias left 12:02 Reaganomicon joined
dalek kudo/nom: 22b5c71 | jnthn++ | src/Perl6/Actions.pm:
Defer building of signature objects a little longer, so we get more time to twiddle the parameter descriptors. Will allow us to keep the actions a bit neater.
12:18
kudo/nom: d38d813 | jnthn++ | src/Perl6/ (2 files):
Clean up implicit invocant handling; gets us more STDish again.
kudo/nom: 1f9cb7c | jnthn++ | src/Perl6/Actions.pm:
Set default parameter type (Mu or Any, depending on context).
kudo/nom: e01c3de | jnthn++ | src/CORE.setting/operators.pm:
Remove now-unrequired type annotations.
12:25 tadam joined 12:41 kaare__ left
moritz fwiw rakudo/nom loops on t/00-parrot/01-literals.t 12:55
jnthn moritz: Oddness. 12:57
moritz: Though, I didn't even look at the tests yet.
moritz t/00-parrot/04-op-cmp.t passes 13:01
13:02 am0c left
jnthn oh, nice :) 13:03
moritz: Any chance you can golf down what it is in literals.t that makes it loop? 13:06
moritz: It's a weird failure mode.
dalek kudo/nom: f0f9487 | jnthn++ | src/Perl6/SymbolTable.pm:
Restore named parameters.
13:10
kudo/nom: 6beb173 | jnthn++ | src/Perl6/Actions.pm:
Get positional and named (though not slurpy) placeholder parameters working again.
tadzik so Test.pm compiles? 13:13
13:14 yinyin joined
jnthn tadzik: doubt it 13:14
tadzik I must start keeping 2 copies of Rakudo, so I can gsochack and have fun with nom at the same time
jnthn tadzik: And if it does I doubt that it works... 13:15
tadzik it doesn't parse, that's funny
Semicolon form of module definition not allowed in subscope; 13:16
please use block form at line 8,
jnthn oh.
13:16 tadam left
jnthn tadzik: You may be able to hunt that down. 13:16
tadzik: I copied the hanlding of that stuff from STD, I think. But maybe I screwed up...or didn't test it enough. :)
tadzik hmm
std; module Test; our $a = 'b'; 13:17
std: module Test; our $a = 'b';
p6eval std 4b1b100: OUTPUT«ok 00:01 115m␤»
jnthn nom: module Test; our $a = 'b';
oh wait :)
tadzik: Don't think I put "our" back yet, fwiw. 13:18
tadzik hmm
no, "my" doesn't help there 13:19
jnthn tadzik: I suspect it's something in package_def 13:20
$*begin_compunit handling or some such.
tadzik our scoped variables not yet implemented at line 8, near " = 0;\no" 13:22
better :)
and proto and dispatch auto-generation for multis not yet implemented at line 55 13:23
so I guess the module issue is fixed
or it's broken in a different way
13:23 MayDaniel_ joined
tadzik looks like it was an STD copy-pasto or copy-thinko 13:23
and the warning still works when it should, commiting 13:25
std: { module asd; }
p6eval std 4b1b100: OUTPUT«===SORRY!===␤Semicolon form of module definition not allowed in subscope;␤ please use block form at /tmp/hwt_zMISGB line 1:␤------> { module asd⏏; }␤ expecting any of:␤ name␤ trait␤Parse failed␤FAILED 00:01 112m␤»
tadzik that's it
jnthn tadzik++ 13:27
tadzik jnthn++ for proper motivation :)
also, running nom from outside the build directory is broken 13:28
jnthn tadzik: master requires make install for that, no?
tadzik jnthn: yes, but that doesn't help nom
jnthn tadzik: Sure, the make install target hasn't been updated at all :)
tadzik :P 13:29
I'll try to peek on that
jnthn tadzik: Feel free to work on it. perl6.exe, CORE.setting.pbc and everything in blib/Perl6/ needs installing.
tadzik where should the pbcs land?
jnthn Oh, and the dynops/dynpmcs, but that shoudln't change
Hmm, good quesiton
Where Parrot will find them ;-)
I guess in its library directory 13:30
tadzik as where perl6.pbc does?
jnthn yeah, CORE.setting.pbc would go where perl6.pbc does, then make a Perl6 subdirectory within that location for the stuff inside blib/Perl6/
dalek kudo/nom: 5af4643 | tadzik++ | src/Perl6/Grammar.pm:
Fix semicolon form of module definition conforming to STD
tadzik bleh, make rebuild everything on every Makefile update 13:32
jnthn trying to track down why switching trait_mod:<is> to multi-dispatch causes issues 13:35
13:39 whiteknight left 13:41 tadam joined
jnthn oh duh, I think I did something silly 13:41
colomon oh noez!
jnthn silly? 13:42
sorear good * #perl6
colomon \o
sorear maybe I'll get something useful done today
13:43 woosley joined 13:44 tadam left
JimmyZ \o 13:47
tadzik o/
I feel wrong about having PERL6_PBC and PERL6_PBCS in one Makefile
13:48 jfried left 13:49 colomon left
jnthn tadzik: maybe the second one wants to be PERL6_BLIBS 13:52
tadzik "load_bytecode" couldn't find file 'blib/Perl6/ModuleLoader.pbc' -- looking for pbcs in blib/ seems wrongish
mebbe
13:53 _twitch joined
sorear tadzik: why? 13:53
tadzik sorear: everything wants Perl6/Foo.pbc, only ModuleLoader wants to be in blib 13:54
when we install it, it doesn't really want to be in /parrot/blabla/library/blib/Perl6/ contrary to everything else I suppose
sorear jnthn: I'm having trouble figuring out how nom's SubsetHOW works. 13:55
jnthn sorear: ? 13:56
sorear: It's just an empty class ATM
sorear Oh, it *doesn't* work? 13:57
jnthn sorear: Right :)
sorear: Just a "fill this in" stub :)
sorear ha...okay
can you answer a few questions on what will go in there?
obviously the most important part of subset is type_check 13:58
13:58 colomon joined
jnthn sorear: IIRC I need to twiddle with the type check stuff a bit more generally. 13:58
sorear er, other way around
yeah
tadzik jnthn: any opinion on the hardcoded blib issue? 13:59
sorear I'm left wondering about stuff like 'my SubsetType $s; $s.perl.say'
and 'SubsetType.^isa(BaseType)'
jnthn sorear: I'll probably look at it within the next week.
sorear ok. I'll do enums instead today 14:00
o/ colomon
jnthn tssk, my traits bug gets weirder and weirder... 14:01
oh wait...duh.
tadzik heh, now it works after make install and doesn't without installing :> 14:03
sorear colomon: do you have the source for the mandelbrot code you tested on niecza? I wanna check it for more LHF :) 14:05
14:05 yinyin left
daniel-s hi 14:09
is there a cleaner way of doing this?:
$file_out.say("{@company[$i]},{@link[$i]}");
it's in a for loop that goes from 0 to the lenth of the arrays (both same) 14:10
jnthn Don't need the {...} 14:11
@company[$i] will interpolate by itself
dalek p: 5baa62c | jonathan++ | src/6model/sixmodelobject.c:
Fail in a more helpful way when important stuff is missing in meta-objects.
14:12
daniel-s yep, worked, thanks 14:13
so an array that is indexed will interpolate, but not one without an index 14:14
moritz correct
sorear daniel-s: are @company and @link always the same length? 14:17
daniel-s yes 14:18
if they weren't I would have checked first, or checked as they were being filled, but it worked fine for what I needed
sorear consider for @company Z @link -> $company, $link { $file_out.say("$company,$link") } 14:19
moritz for @company Z @link -> $c, $l { say "$c, $l" }
14:19 hudnix joined
daniel-s what does the Z do? 14:19
moritz rakudo: say <a b c> Z 1, 2, 3;
p6eval rakudo 048573: OUTPUT«a1b2c3␤»
daniel-s i see 14:20
14:20 ymasory left
JimmyZ rakudo: say <a b c> Z, 1, 2, 3; 14:24
p6eval rakudo 048573: OUTPUT«a1b2c3␤»
sorear I still think $ORS = '' is the wrong default. 14:25
er
$OFS 14:26
moritz jnthn: it's the 0_0_1_4 in 01-literals.t that makes nom loop 14:27
news.perlfoundation.org/2011/06/201...t-pmt.html 14:30
is Marc Fisher here?
tadzik I want to see the "Documentation for a module" part :> 14:32
unless that'd be just extracting the pod, though that's non-trivial too 14:33
moritz thinks the proposal is rather half-baked 14:34
jnthn std: 0_0_1_4
p6eval std 4b1b100: OUTPUT«ok 00:01 111m␤»
jnthn rakudo: say 0_0_1_4
p6eval rakudo 048573: OUTPUT«14␤»
jnthn moritz: Thanks, will investigate in a bit. 14:35
sorear Fisher mentions perlesque in a blog post from 2010 14:38
maybe diakopter knows em
14:39 Ali_h joined 14:41 isBEKaml joined 14:42 JimmyZ_ joined
dalek kudo/nom: 999dba4 | jnthn++ | src/binder/ (3 files):
Few small multi-dispatch fixes/tweaks.
14:43
kudo/nom: c14145b | jnthn++ | src/Perl6/Metamodel/NativeHOW.pm:
NativeHOW.type_check.
kudo/nom: a49224b | jnthn++ | src/CORE.setting/traits.pm:
Oops, left in debugging code.
kudo/nom: 6942b63 | jnthn++ | src/CORE.setting/traits.pm:
Switch trait_mod:<is> to use multi-dispatch, so we'll be able to add more traits.
kudo/nom: dfeb5b9 | jnthn++ | NOMMAP.markdown:
Remove done items from nommap.
14:45 JimmyZ left, JimmyZ_ is now known as JimmyZ
moritz left a comment on the tpf blog, but it's held for moderator approval 14:46
14:46 bluescreen10 joined
tadzik jnthn: I added the install targets, but the remote executing still fails on blib/Perl6/ModuleLoader.pbc. If I remove blib/ from SymbolTable.pm (the only place where it exists), then the local executing gets broken 14:47
wklej.org/id/540866/ -- the patch
sorear I wonder if [email@hidden.address] redirects anywhere useful 14:48
tadzik perl6: [email@hidden.address]
p6eval pugs, rakudo 048573: OUTPUT«zysvfure@pcnn.bet␤»
..niecza v6-56-g84360d1: OUTPUT«Unhandled exception: Unable to resolve method trans in class Str␤ at /tmp/0mMxYHqSQH line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1565 (CORE C715_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1566 (CORE module-CORE @ 53) ␤
..at /home/p6eval…
sorear why do I even bother
tadzik-- 14:49
moritz the IRC logs do their best to obsucre the email address 14:50
tadzik: you might need the blib/ in the install location too - at least for ModuleLoader.pbc 14:51
jnthn I don't mind putting blib in the install location for now, fwiw.
tadzik moritz: then it breaks in that other way I described 14:59
moritz tadzik: I didn't see a description of that other way, sorry 15:01
tadzik oh, right
that crashes in a different way then
or maybe I mixed it up 15:02
moritz did you try to put everything under blib/, or just the module loader?
tadzik just the module loader
Null PMC access in find_method('load_setting') when I cp it there 15:06
15:08 isBEKaml left 15:11 benabik joined 15:16 pjcj left
jnthn std: sub foo(\$foo) { } 15:17
p6eval std 4b1b100: OUTPUT«Potential difficulties:␤ $foo is declared but not used at /tmp/rOAp5VQd1v line 1:␤------> sub foo(\⏏$foo) { }␤ok 00:01 114m␤»
jnthn std: sub foo(\$foo) { $foo }
p6eval std 4b1b100: OUTPUT«ok 00:01 115m␤»
jnthn std: sub foo(\:$foo) { $foo }
p6eval std 4b1b100: OUTPUT«===SORRY!===␤Malformed parameter at /tmp/g2hRzGj0le line 1:␤------> sub foo(⏏\:$foo) { $foo }␤ expecting any of:␤ name␤ new name to be defined␤ parameter␤ routine_def␤ signature␤Parse failed␤FAILED 00:01 113m␤»
jnthn std: sub foo(:\$foo) { $foo }
15:17 JimmyZ_ joined
p6eval std 4b1b100: OUTPUT«===SORRY!===␤Malformed parameter at /tmp/IjDmC5DLDR line 1:␤------> sub foo(:⏏\$foo) { $foo }␤ expecting any of:␤ formal parameter␤ named_param␤Parse failed␤FAILED 00:01 113m␤» 15:17
jnthn hmm...how to parcel a named :)
15:20 JimmyZ left 15:21 JimmyZ_ is now known as JimmyZ
JimmyZ std: sub foo( \ :$foo) { $foo } 15:33
p6eval std 4b1b100: OUTPUT«ok 00:01 115m␤»
JimmyZ std: sub foo( : \$foo) { $foo }
p6eval std 4b1b100: OUTPUT«ok 00:01 115m␤»
15:44 daniel-s left 15:46 ymasory joined, birdwindupbird joined
JimmyZ sleeps 15:46
15:46 JimmyZ left 15:50 woosley left 15:51 lue joined
lue hello o/ Just came to give you a blag post: rdstar.wordpress.com/2011/06/04/lu...line-soon/ 15:52
dalek kudo/nom: 9120d6c | jnthn++ | src/CORE.setting/Mu.pm:
Stub new/CREATE/bless.
15:55
kudo/nom: a790134 | jnthn++ | src/CORE.setting/Mu.pm:
Mu.Bool, Mu.defined.
kudo/nom: 8c632b6 | jnthn++ | src/Perl6/Metamodel/AttributeContainer.pm:
Interface for the actions to get at attributes that are allowed to be accessed in the current class body.
16:00 thou joined 16:06 wamba joined 16:07 ilogger2 joined, ChanServ sets mode: +v ilogger2 16:23 kaare__ joined
moritz github.com/zhuomingliang/rakudo/co...543743e08f 16:30
16:31 cooper|ipad joined
moritz I don't understand that - why is the ? necessary? I mean there aren't multiple occurrences of parrot_config in the path, and if yes, we'd want to substitute the last, right? 16:31
dalek kudo/nom: f9e5f02 | jnthn++ | / (3 files):
Start fleshing out Attribute a bit more.
16:32
kudo/nom: b748b55 | jnthn++ | src/Perl6/Actions.pm:
Fix up attribute access, including compile-time detection of missing/tyop'd attributes.
kudo/nom: 6a20ac9 | jnthn++ | src/Perl6/Actions.pm:
Attribute binding.
p: 401cd85 | jonathan++ | src/ops/nqp.ops:
Missing decontainerize. Unbreaks some type checks in rakudo/nom.
16:42
jnthn moritz: Doens't immediately make much sense to me either. 16:43
D'oh, that attribute binding patch didn't really work at all... 16:46
17:02 thou joined 17:04 thou left 17:05 hanekomu joined
sorear Does binding attributes make sense? 17:06
jnthn sure 17:07
Actually I got the binding bit right and screwed up the type check in the first attempt.
sorear $!foo only, right?
jnthn Yes
$.foo := ... won't work.
nom is *very* strict about what can appear on the LHS of a bind. 17:08
sorear Does $.foo := ... make any sense whatsoever?
jnthn Compile time error in nom.
dalek kudo/nom: 5634c40 | jnthn++ | src/Perl6/ (2 files):
Attribute binding that actually seems to work.
sorear I feel... vindicated.
some months ago I was trying to argue that the LHS of binds should be restricted to a small number of semantic forms 17:09
jnthn If you're going to make binding cheap and have a chance at an efficeint container model, I think it has to be that way.
TimToady has always thought that binding should be very primitive 17:10
17:11 tadam joined
TimToady (which doesn't stop TimToady from wanting contradictory things, of course...) 17:11
jnthn sorear: Note that $!foo works because (unlike is sometimes speculated) $!foo is *always* a directl reference to an attribute storage slot. Not a magically inlined private accessor method for that storage slot.
(And yes, I know I S12 may be wrong there.) 17:12
sorear no, S12 agrees with you
jnthn ah, good :)
TimToady the existence of a private accessor does not contradict
sorear the magically inlined private accessor thing is something I made up 17:13
jnthn TimToady: The existence of one doesn't; $!foo within the class body meaning "that accessor" does, though.
sorear it simplified some things
TimToady I think it's generated on demand, is more like what it should be
jnthn I figure the use case is for trusted classes that want to get at the attributes? 17:14
TimToady yes, and we trust ourselves too :)
jnthn OK
I'll have a shot at trusts at some point.
TimToady but really, the syntax is just a funny way of calling a function
sorear jnthn: that, and to get rid of the distinction between $!foo and $!foo()
in the niecza model they are exactly the same 17:15
jnthn sorear: I don't think that's correct, fwiw.
TimToady it's a false(ish) analogy to $.foo and $.foo()
a consistency we don't really need 17:16
sorear what, TimToady arguing against strange consistency? *faints*
jnthn > class Foo is Mu { has $!x; method m { $!x := -> { say 42 }; $!x() } }; Foo.new.m 17:17
TimToady it would be less compelling if we didn't have twigils
jnthn 42
TimToady or if we hadn't chosen closely related twigils
sorear what happens on has $!foo; say @!foo ? 17:18
TimToady it's more like the consistency of people who line up constructs vertically that aren't really related 17:19
jnthn > class Foo { has $!x; method m { @!x } }
Attribute @!x not declared in class Foo at line
TimToady that looks like the right answer to me 17:20
jnthn (that's nom...)
sorear ooh, comple time error, nifty
jnthn ooh, it did say line 1 too
I pasto'd :)
Yes, master doesn't complain until runtime.
17:22 thou joined, thou left
jnthn Time for a break and some dinner. 17:23
17:23 thou_ joined
colomon sorear: github.com/colomon/mandelbrot/blob...t-color.pl 17:27
17:36 pschon joined
sorear thanks 17:37
259 lines and it ran without modification? nice 17:38
17:41 Moukeddar joined
TimToady according to justrakudoit.wordpress.com/2011/05/...rakudo-it/ he made a couple of trivial mods 17:42
17:42 pschon left
colomon first made trivial mods to the script, then made trivial mods to Niecza so the script would run without them. :) 17:45
17:46 Trashlord joined
colomon In particular, adding .re and .im and fixing Complex.abs. 17:46
to be fair, most of the lines are color data. :) 17:47
17:58 PhatEddy joined
PhatEddy rakudo: class ting{has $.tang; submethod BUILD($wallah){ $.tang = $wallah +2 } }; my $x = ting.new(5); say $x.tang 17:59
p6eval rakudo 048573: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in 'ting::BUILD' at line 22:/tmp/U004LXPrz4␤ in main program body at line 22:/tmp/U004LXPrz4␤»
PhatEddy There is an rt that looks a bit similar here: rt.perl.org/rt3/Public/Bug/Display.html?id=73688 18:00
Bug? new or attach to similar rt?
TimToady the default new does not take positional parameters 18:02
pmichaud good afternoon, #perl6 18:03
colomon PhatEddy: what TimToady is trying to say, the code is wrong. :)
TimToady suppose you have a complicated object with various parents
each BUILD has to know whether the parameter is for it or not
they can't all claim the first parameter
so you have to use named arguments
s:g/parameter/argument/ 18:04
PhatEddy I understand the point about the code being wrong and am reading through the explanation ... Thx
mberends hi pmichaud
TimToady the error message is definitely LTA
dalek p: 13eb661 | pmichaud++ | / (3 files):
Refactor --gen-parrot and Configure.pl a bit more, move git repo

The --gen-parrot argument to Configure.pl now accepts an optional value to be used for 'git checkout'; thus "--gen-parrot=master" will build Parrot from its 'master' branch instead of the one given by tools/build/PARROT_REVISION. Any valid argument to
  "git checkout" can be given to "--gen-parrot". Minimum revision
checks (according to --min-parrot-revision or tools/build/PARROT_REVISION) are still performed.
p: df3bf99 | pmichaud++ | src/ops/nqp.ops:
Merge branch 'master' of github.com:perl6/nqp
TimToady wonders if we could install a default multi method new ($bogus, *@bogus) { die "This error message is not LTA." } 18:05
18:06 george_z0rwell joined
pmichaud since nom's new won't be written in PIR and will use Rakudo's normal binder, I'd expect the error message to improve 18:06
instead of Parrot's LTA "got 1 but expected 2" 18:07
jnthn s/will/is/ :P
(OK, it's only a stub...I don't have hash yet. :P)
pmichaud nom: say 1 # do we have 'nom' yet?
nom: say 1 # do we have 'nom' yet?
jnthn pmichaud: Not yet.
pmichaud ENONOM
I think that means it's time for me to get lunch. :) 18:08
TimToady rakudo: use MONKEY_TYPING; class Mu { multi method new ($bogus, *@bogus) { die "Your code is RWONG!" } }; say Cool.new(1,2,3)
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'Mu'␤»
jnthn TimToady: augment :)
TimToady rakudo: use MONKEY_TYPING; augment class Mu { multi method new ($bogus, *@bogus) { die "Your code is RWONG!" } }; say Cool.new(1,2,3)
p6eval rakudo 048573: OUTPUT«===SORRY!===␤A method named 'new' already exists in class 'Mu'. It may have been supplied by a role.␤»
jnthn TimToady: And existing one isn't multi.
TimToady who designed this stupid language?!?
pmichaud ...it's been designed? 18:09
jnthn I'm not sure the spec says that the default one should be multi or not. :)
I suspect it may be worthwhile making it so.
pmichaud multi new +1
TimToady rakudo: use MONKEY_TYPING; augment class Any { multi method new ($bogus, *@bogus) { die "Your code is RWONG!" } }; say Cool.new(1,2,3)
p6eval rakudo 048573: OUTPUT«Cool()<0x436d160>␤»
TimToady heh 18:10
someone's cheating somewhere...
18:10 Moukeddar left
jnthn heh, wtf. 18:10
TimToady niecza: use MONKEY_TYPING; augment class Mu { multi method new ($bogus, *@bogus) { die "Your code is RWONG!" } }; say Cool.new(1,2,3) 18:12
p6eval niecza v6-56-g84360d1: OUTPUT«Potential difficulties:␤ @bogus is declared but not used at /tmp/14YggAAKaR line 1:␤------> t class Mu { multi method new ($bogus, *⏏@bogus) { die "Your code is RWONG!" } };␤ $bogus is declared but not used at /tmp/14YggAAKaR line 1:␤------>
..G; augment cla…
TimToady niecza: use MONKEY_TYPING; augment class Mu { multi method new ($bogus, *@bogus) { die "Your code is RWONG!"; $bogus; @bogus } }; say Cool.new(1,2,3) 18:13
p6eval niecza v6-56-g84360d1: OUTPUT«Unhandled exception: No matching candidates to dispatch for new␤ at line 0 (new @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1556 (CORE module-CORE @ 50) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1566 (CORE mainline @ 1) ␤ at line 0 (boot-MAIN @ 1) ␤
..at line 0 (…
pmichaud TimToady: just to verify -- does List.new(...) in a Parcel flatten or not-flatten? e.g., (1, 2, List.new(...), 3)
i.e., does .new always return a (non-flattening) item?
18:13 cognominal_ joined
TimToady funny, on my local niecza it tell me my code is RWONG 18:13
is this niecza out of date? 18:14
pmichaud (rakudo master treats .new as flattening, I think) 18:15
TimToady pmichaud: I'd think it'd return a sub-Parcel that defers the flattening decision
such that a lol would Seq-ize it
pmichaud I meant if the parcel is subsequently flattened 18:16
my @a = (1, 2, List.new(...), 3)
TimToady sure, if it's a subparcel, it flattens
pmichaud okay
same with
TimToady same as my @a = (1, 2, ('a', 'b', 'c'), 4, 5)
pmichaud my @a = (1, 2, Range.new(:min(3), :max(5)), 6)
?
that ends up with six elements, not four?
TimToady yes, ranges are supposed to flatten in list context, but not in lol context 18:17
s/list/flat/
pmichaud okay 18:18
good to know -- will keep it that way then.
thanks
PhatEddy I vaguely understand from the discussion that my code is wrong because of issues related to multiple inheritance but a better error message is desirable and expected soon from nom. 18:20
TimToady yes, except it's also a problem with single inheritance
you still have multiple BUILDs in that case 18:21
and it does look practical to give a better message someday
pmichaud (someday soon, even)
afk, fetching lunch 18:22
TimToady rakudo: say grep 1..3, 0..5; 18:23
p6eval rakudo 048573: OUTPUT«123␤»
TimToady that's correct
18:23 tadam left
TimToady pmichaud: ^^ 18:23
pmichaud that doesn't seem related to my question, but okay :-) 18:24
TimToady 1..3 and 0..5 both behave like parcels 18:25
the 0..5 flattens, but the 1..3 doesn't
pmichaud right, but that's an argument list
TimToady because of the context binding to grep
0..5 is in list context
pmichaud and infix:<..> could have different flattening semantics than Range.new 18:26
(from what you just said it doesn't... but it could've gone the other way :)
TimToady I don't see much reason to make them different
sorear sub () is rw { 5 } # is this an error?
jnthn imo yes
pmichaud 'is rw' usually checks for rw-ness
sorear does sub () is parcel make sense? :_ 18:27
:)
TimToady the normal result of any function/method is a Parcel-ish thing, so I tend to go with Parcel semantics when possible
pmichaud wfm
TimToady sorear: I dunno, but it makes my head hurt more... 18:28
pmichaud on a similar note, then
if someone defines their own .new method:
class XYZ { method new($x) { my $obj = self.bless(...); $obj } } 18:29
then XYZ.new would end up being non-flattening in a Parcel (because it was returned as a scalar)
what will be the best way to avoid that?
sorear well sometimes there are code objects that want to only sometimes return a rw value
18:30 Chillance joined
sorear pmichaud: niecza has an unitem() primitive for cases like that 18:30
pmichaud sorear: this looks like it might end up being a FAQ
TimToady new($x --> Parcel) maybe
sorear Range.new($x,$y) is defined approximately like unitem(self.bless(*, :$min, :$max))
TimToady maybe not
jnthn pmichaud: Explicitly return it in a Parcel 18:31
pmichaud jnthn: that doesn't eliminate flattening
jnthn TimToady: That's more a check than a coercion
pmichaud the flattening is due to the '$'
18:31 tomaw joined
TimToady huh? 18:31
pmichaud er, non-flattening is due to the '$'
jnthn TimToady: --> is sugar for "returns" or "of"?
TimToady return |$obj; # :P
pmichaud sorry, I mis-phrased all of that
sorear whether the value is returned in a Parcel or not has no effect on any of this 18:32
TimToady right
pmichaud it's the $ that causes the return value to be non-flattening
sorear my $a1 = [1,2,3]; my @x = $a1,; # $a1 is wrapped in a Parcel, nothing happens
pmichaud putting it in a parcel just means it's a parcel with a non-flattening item
jnthn ah, yes 18:33
sorear niecza: my $a1 = [1,2,3]; say $a1.perl; say (@$a1).perl; say unitem($a1).perl
p6eval niecza v6-56-g84360d1: OUTPUT«[1, 2, 3]␤[1, 2, 3].list␤[1, 2, 3].list␤»
TimToady nothing sets the "flatten me" flag, on some level or other
the @ flag, as it were
pmichaud I don't mind saying that method new() should return $obj.list or @($obj) or somesuch
sorear pmichaud: the trouble is that .list causes Range to become List 18:34
TimToady @$obj
why?
shouldn't .flat do that?
sorear which is why I have unitem
TimToady .list is not .flat
pmichaud Range is not a List
so .list is the normally way to make it into one 18:35
*normal
regardless of flattening/non-flattening
TimToady wonders whether he should wonder whether the Tylenol is poisoned... :) 18:36
pmichaud sorear: I tend to think of the default new as doing "return self".... which could already be a non-item. 18:37
so doing .list wouldn't be necessary on Range
TimToady wonders whether Range does Parcel makes any sense... 18:39
sorear pmichaud: that's because in your world, all objects default to non-item, but the flag is only respected for subclasses of Iterable
18:39 Khisanth joined
sorear in my world, the flag is respected for everything, so objects are items by default 18:40
TimToady can you give some examples of where it makes a difference?
sorear my @x = Range.bless(*, :min(1), :max(10))
in niecza, @x.perl = [1..10] 18:41
pmichaud btw, in nom we're eliminating the flags altogether.
sorear in rakudo, @x.perl = [1,2,3,4,5,6,7,8,9,10]
pmichaud it's generally a compile-time thingy
sorear pmichaud: that doesn't even make sense
pmichaud istr that TimToady++ has said in the past that he felt that flattening ought to be compile-time based on the sigil 18:42
sorear how will you tell the difference between sub foo() { [1,2,3] } ans sub foo() { my @ = 1, 2, 3 } ?
then [0,foo,4]
pmichaud because [1,2,3] returns an Array that is wrapped in a Scalar 18:43
and Scalar's don't flatten.
the second just returns an Array
jnthn I guess it's not so much "no flag" as "the flag is just a type"
pmichaud "the flag is a Scalar container"
jnthn Right.
pmichaud so TimToady's earlier suggestion of return |$obj (or something like it) might be sufficient. 18:45
jnthn (Actually, Scalar is a type that something knows is a scalar container, and the mechanism is there for other types to be too...so the whole container stuff will be useful to other HLLs)
18:45 tomaw left
pmichaud btw, my @x = Range.bless(*, :min(1), :max(10)) should end up with @x being eagerly evaluated, iirc 18:46
because array assignment is "mostly eager" 18:47
sorear do you draw a cutoff anywhere?
pmichaud not as long as the list is known finite 18:48
TimToady niecza: say grep 1..3, 0..5;
p6eval niecza v6-56-g84360d1: OUTPUT«123␤»
sorear what do you think of for 1e0..1e10 { .say } ?
TimToady niecza: say grep 1..3, Range.bless(*, :min(1), :max(10)); 18:49
p6eval niecza v6-56-g84360d1: OUTPUT«Unhandled exception: Unable to resolve method bless in class Range␤ at /tmp/rYVdmW4Xoo line 1 (MAIN mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1565 (CORE C715_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1566 (CORE module-CORE @ 53) ␤
..at /home/p6ev…
18:49 cooper|ipad left
pmichaud sorear: I'm pretty sure that's lazy. 18:49
sorear bless(*, ...) is currently spelled CREATE(...)
pmichaud (because 'for' is lazy) 18:50
TimToady niecza: say grep 1..3, Range.CREATE(:min(1), :max(10));
p6eval niecza v6-56-g84360d1: OUTPUT«␤»
TimToady rakudo: for 1e0..1e10 { .say } 18:51
p6eval rakudo 048573:
..OUTPUT«(timeout)␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73␤74␤75␤76␤77␤78␤79␤80␤81␤82␤83␤84␤85␤86␤87␤
TimToady looks lazy to me
rakudo: for eager 1e0..1e10 { .say }
p6eval rakudo 048573: OUTPUT«(timeout)» 18:52
TimToady looks eager to me :)
rakudo: for "aaaaaa" .. "zzzzzz" { .say } 18:53
p6eval rakudo 048573:
..OUTPUT«(timeout)aaab␤aaaaac␤aaaaad␤aaaaae␤aaaaaf␤aaaaag␤aaaaah␤aaaaai␤aaaaaj␤aaaaak␤aaaaal␤aaaaam␤aaaaan␤aaaaao␤aaaaap␤aaaaaq␤aaaaar␤aaaaas␤aaaaat␤aaaaau␤aaaaav␤aaaaaw␤aaaaax␤aaaaay␤aaaaaz␤aaaaba␤aaaabb␤aaaabc␤aaaabd␤aaaabe␤aaaabf␤aaaabg␤aaaabh␤aaaabi␤aaaabj␤aaaabk␤aaaabl␤aaaabm␤aaaabn␤aa…
TimToady sure would be nice if that (timeout) didn't overwrite the beginning... 18:54
pmichaud yeah, that seems kinda weird. :-)
sorear niecza's general policy is to process lists eagerly until it hits an iterator, then go lazy
I think this is what you call "mostly eager"
pmichaud no
a simple iterator isn't sufficient.
18:55 thou_ left
TimToady we mark our iterators as finite/infinite 18:55
s/we/rakudofolk/ :)
pmichaud well, even in Perl 6.
the problem the infinite/finite is intended to avoid is action-at-a-distance due to laziness
18:56 cooper|ipad joined
pmichaud with my @a = (1, 2, 3, @b, 4) 18:56
we can't stop evaluating as soon as we hit b's iterator, because the next line might be
@b[100] = 'oops'
TimToady it forces eager to behave a bit more like what a P5 person would expect
pmichaud and we want @a to have the value of @b *before* that assignment was made
s/@b/@b[100]/ 18:57
sorear rakudofolk have a lot of influence on perl 6
TimToady fershure
pmichaud only because we've asked a lot of hard questions already
it's not that we said "this is how the language should be" -- it's that we said "how is this supposed to work?" and these are the answers we got back.
sorear so once I have not-completely-eager list assignment, it'll need to keep going until it sees a cursor marked as "infinite" 18:58
does "stop at any iterator" work for "mostly lazy" level? 18:59
s/iterator/cursor/
pmichaud I think that mostly lazy is allowed to work ahead or not as it desires
TimToady even if the rest of S07 is bogus, the definitions at the front are pretty accurate 19:01
sorear Have you figured out ,* yet?
pmichaud ,* is a compile-time marker that marks a parcel as being "infinite" or "whateverish"
TimToady the latest is that it's just a marker, and no Whatever appears on the end
pmichaud (I haven't quite decided what the better term for it is)
TimToady and maybe ,() is the opposite marker
and we decided it was easy enough to do the 'repeat last element' some other way 19:02
pmichaud .repfinal works for me, btw.
TimToady @stuff.repfinal(3) for insta... yeah
sorear what does marking a parcel infinite do?
pmichaud causes its iterator to report "infinite" 19:03
masak rehi, #perl6!
pmichaud which means that eager evaluation of that parcel becomes lazy
TimToady hire, #masak
pmichaud (mostly eager evaluation, that is)
jnthn hire masak!
no, wait, don't... :)
masak :) 19:04
pmichaud this enables things like &infix:<...> to be able to signal "I'm returning an infinite sequence because my RHS is *"
internally, when &infix:<...> knows that its RHS is *, it can return a parcel of (gather { ... } ,*)
which means that the result is conceptually infinite 19:05
TimToady or however we mark it internally
19:05 tomaw joined
pmichaud ("however we mark it internally" == the ,* after the gather is resolved at &infix:<...>'s compile time :-) 19:06
TimToady I'm pretty comfortable with the boundary between mostly lazy and mostly eager; the boundary with strictly eager is probably sink context; I'm less sure how the boundary with strictly lazy works
since some recursive definitions need something approaching strict laziness
there's handwaving verbiage in "Mostly Lazy" about that, but I'm not sure how we detect circular definition without deadlock... 19:07
but several rosettacode examples could use better recursive definitions of lazy constant arrays 19:09
pmichaud TimToady: would ,* resolve some of those, ooc?
TimToady I don't want to go as far as Haskell in requiring strict laziness
I don't think ,* does anything to help the strict lazy end 19:10
pmichaud for example: my @a = (1, 2, @b, 3, *)
would tend to make evaluation lazy
TimToady it does let us issue an immediate "out of memory" error on ;1..*;
pmichaud because the parcel is signalling "infinite"
TimToady yes, that would lazify it, and then we could blow up the rocket if they run off the end :) 19:11
except, of course, that it's allowed to work ahead, so you can't guarantee that @b isn't immediately evaluated 19:12
pmichaud troo 19:13
TimToady my @a = (1, 2, lazy @b, 3) has the same issue
my @a = (1, 2, very-lazy @b, 3) 19:14
and very-eager :)
19:15 cooper|ipad left
TimToady or make very a meta-op on the next thing :) 19:15
masak uber-lazy
pmichaud LAZY
EAGER
TimToady my @a = (1, 2, (very lazy @b), 3)
sorear I thought it was supposed to be a pragmatic module
TimToady well, it's our spec, we can rewrite it :) 19:16
sorear I suppose infinitized iterators have to distribute their infiniteness to any iterators they generate on reify?
TimToady well, maybe the last one
pmichaud yeah, I'm not sure that follows. 19:17
TimToady I suppose it depends on what kind of sub-iterator you're generating...
pmichaud ,* simply means "act like an infinite list", it doesn't actually make the list infinite. :-)
sorear my @x = (gather { ... }, *); @x.shift; my @y = @x;
after the shift, the original ParcelIterator is gone 19:18
@x contains only a GatherIterator
pmichaud @x isn't infinite.
nor does it need to be marked at asuch.
*as such
TimToady doesn't follow 19:19
pmichaud I don't quite follow the example either
sorear my @x = (gather { take 1 while 1 }, *); @x.shift; my @y = @x;
better?
pmichaud likely run out of resources on the my @y = @x;
as it tries to mostly eager evaluate @x 19:20
TimToady unless it's marked infinite
which is what sorear++ is asking
pmichaud right
I'm not sure we should have that level of transitivity
TimToady wonders whether ,* should be a real sentinal
*nel 19:21
pmichaud somewhat like Nil?
maybe an infinite Nil?
19:21 pjcj joined
sorear INFINITE NOTHING 19:22
pmichaud (i.e., () but with an infinite flag set)
TimToady which is why I was proposing () for the Other
sorear what would that do? 19:23
TimToady mark it as finite, but it wouldn't work if ,* is also Really
pmichaud I think "force a Parcel to act finite, regardless of its contents"
TimToady There
@foo, *, () is a problem 19:24
or however one writes it
pmichaud oh, that looks like something else entirely to me
I was thinking that ,* was "infinite" only at the end
in the middle, it's just a Whatever.
TimToady which smells
pmichaud agreed
which is the smell I've detected with ,* somewhat from the beginning :-) 19:25
TimToady was thinking if it's a real sentinel, then (1,@foo,3) could have @foo return ,* and it would still work
for most purposes, we could replace ,* with ...* 19:26
pmichaud oooh
well, not exactly 19:27
sorear I don't get it. What's the practical difference between @foo and @foo,() ?
pmichaud (1,3,5,*) is definitely different from (1,3,5 ... *)
TimToady troo
pmichaud heh 19:28
TimToady sorear: it'd only be different if @foo looked infinite
pmichaud which leaves
1,3,5, () ... *
or
19:28 pjcj left
pmichaud 1,3,5, () xx * 19:28
sorear TimToady: I want to know _how_ it would be different ... 19:29
19:29 wamba joined
TimToady (un)fortunately, my lunch has just arrived...* 19:29
pmichaud () xx * might be very workable
TimToady ** almost means that 19:30
nom &
pmichaud sorear: a lot of this comes down to "how do we signal infinite lists in subscripts" (which is what started this)
so, @a[1,2,3,foo()] might autotrim if foo() was detectably infinite 19:31
a final ,() could mean "ignore the infiniteness of earlier items in the parcel"
thus @a[1,2,3,foo(),()] prevents autotrimming, even if foo() signals infiniteness
or something like that. 19:32
sorear What if earlier items in the parcel aren't infinite, but will produce infinite items when reified?
pmichaud I agree, I don't quite see the full use case for ,() yet.
sorear e.g. (1, infinitelist, 2)
pmichaud it's "detectably infinite" that we're looking for, generally
not "ends up being infinite"
we really have three states -- "known finite", "known infinite", and "not known to be either" 19:33
various operations may choose different cutoffs based on whether something is known to be finite or known to be infinite 19:34
if we "discover" infiniteness in the process of reifying, that's yet another case (that the operation can decide how it wants to handle) 19:35
19:35 MayDaniel_ joined
PhatEddy perl6: class A {has $.a is rw}; class B is A {has $.a is rw}; my $x = B.new; $x.a = 12 19:36
p6eval pugs, rakudo 048573, niecza v6-56-g84360d1: ( no output )
PhatEddy rakudo: class A {has $.a is rw}; class B is A {has $.a is rw}; my $x = B.new; $x.a = 12
p6eval rakudo 048573: ( no output )
masak ...and that's correct!
19:36 MayDaniel_ left
PhatEddy Which class a attribute did I update? 19:37
19:37 pjcj joined
tadzik PhatEddy: none. You updated an attribute of an object, not a class 19:37
and the object was of class B
(I suppose)
jnthn It was a method dispatch, so yes, B. 19:38
pmichaud you updated the one in class B
afk, walk
19:43 pjcj left 19:47 Moukeddar_ joined
sorear PhatEddy: in rakudo master and niecza, dunno about pugs, you updated both simultaneously 19:50
AFAIK only nom implements the "attributes are identified by class x name" thing yet
PhatEddy still playing with it ... thx 19:51
TimToady eh? no, those should be two separate $!a locations
and $.a is always virtual
jnthn TimToady: It's certainly that way in nom.
TimToady so only looks at the outer
you'd have to get fancy to set them all 19:52
sorear TimToady: bug in rakudo master and niecza
TimToady rakudo: class A {has $.a is rw; method report { say $!a.perl }}; class B is A {has $.a is rw; }; my $x = B.new; $x.a = 12; $x.report 19:53
p6eval rakudo 048573: OUTPUT«12␤»
TimToady yes, that's rwrong
pugs: class A {has $.a is rw; method report { say $!a.perl }}; class B is A {has $.a is rw; }; my $x = B.new; $x.a = 12; $x.report 19:54
p6eval pugs: OUTPUT«\12␤»
TimToady that's also bogus
moritz thinks that's good material for a test case 19:55
TimToady it's like, the whole *point* of $!a to be a separate location in each class that uses it
when we say "private" we mean "private" 19:56
sorear TimToady: it will work after the nom merge!
jnthn It works in nom already :P
Well, apart from lack of accessor generation... :)
19:56 Vlavv_ joined
TimToady speculatively wipes the sweatdrop from his brow 19:56
jnthn nqp gets it right also now ;)
TimToady nqp: class A {has $.a is rw; method report { say $!a.perl }}; class B is A {has $.a is rw; }; my $x = B.new; $x.a = 12; $x.report 19:57
p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3863 (src/Regex/Cursor.pir:239)␤»
sorear despite my prior claims to the contrary
moritz TimToady: I don't think nqp has automatic accessors
sorear nqp: class A { has $!a; method report() { say($!a) } }; class B is A { has $!a; method set() { $!a := 12 } }; my $x := B.new; $x.set; $x.report; 19:58
p6eval nqp: OUTPUT«␤»
sorear nqp also does not have list ops or assignment
19:58 tadam joined
TimToady bbl # Aron's potential in-laws just showed up to meet the clan... 20:00
20:00 tadam left
PhatEddy Hmmm ... just a thought as to how I got the wrong idea about using build in the first place. The explanation in S12 under Construction and Initialization is very helpful but the example here perlcabal.org/syn/S12.html#Submethods seems confusing. No? 20:01
20:02 kjeldahl joined
tadzik what do you want to do? 20:05
20:05 ggoebel joined
tadzik I find myself using BUILD as Moose BUILD method, so giving it callsame; at the very beginning 20:05
20:06 jfried joined
PhatEddy I was trying to just get the URI module to have a constructor that takes a simple uri string parameter which I now understand I can do by overriding new - fine. 20:07
tadzik: did you look at the link - is it possible that it gives confusing implications about what build does? 20:08
tadzik PhatEddy: I think I read it, and I'm quite confused how BUILD works and why it works that way. I think it's meant to control the attribute initialization
PhatEddy thx 20:09
tadzik personally, I use it as "I want to do something as soon as the object is created and everything is initialized"
rakudo: class A { submethod BUILD { say "whoosh!" } }; A.new 20:10
p6eval rakudo 048573: OUTPUT«whoosh!␤»
20:10 Moukeddar_ left
pmichaud I think "BUILD" (in Perl 6) is more along the lines of "this is how I want this class' attributes to be initialized." 20:11
20:11 wsppan joined
sorear What does an anonymous subset do? 20:12
20:12 wsppan left 20:14 whiteknight joined
TimToady the object is specifically *not* completely initialized when BUILD is called 20:14
and maybe not initialized after either 20:15
since there could be subclasses that haven't run their BUILD yet
sorear: returns an anonymous type object
which you could presumably use on the right of a smartmatch 20:17
tadzik: the object is only guaranteed initialized at the end of BUILDALL 20:18
I think I mentioned this before... 20:19
tadzik yeah, I think so
20:19 MayDaniel_ joined
tadzik which may prove the thing is quite confusing 20:19
sorear Anonymous enums are specced to return an EnumMap rather than a type object. Does this extend to named enums? 20:20
What about the 'enum $foo <a b c>' syntax, is $foo bound to the EnumMap or the type object?
PhatEddy perl6: class A {has $!a is rw; submethod BUILD ($!a) {}}; my $x = A.new(12);
p6eval niecza v6-56-g84360d1: OUTPUT«===SORRY!===␤␤Unhandled parameter twigil ! at /tmp/Nk1fctALne line 1:␤------> s A {has $!a is rw; submethod BUILD ($!a⏏) {}}; my $x = A.new(12);␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line
..469 (CORE di…
..rakudo 048573: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in 'A::BUILD' at line 22:/tmp/haXGyGRcNl␤ in main program body at line 22:/tmp/haXGyGRcNl␤»
..pugs: OUTPUT«*** Must only use named arguments to new() constructor␤ Be sure to use bareword keys.␤ at /tmp/u1qKqiIkd6 line 1, column 55-69␤»
PhatEddy that's from another example in S12 20:21
I think ...
Did I misunderstand the example just above here: perlcabal.org/syn/S12.html#Mutating_methods 20:23
masak PhatEddy: I think BUILD parameters are supposed to be named. 20:24
TimToady it will always be called with named args, not positional
PhatEddy I start to understand that but am wondering whether I understood the examples in the Synopsis
TimToady if anything translates positional to named, it'll be the new 20:25
PhatEddy Are the synopsis examples off or do I not understand them, if I may so ask?
TimToady otoh it's relying on binding named args to positional params, which jnthn and masak indicated they'd like to get rid of 20:26
those examples are fine, but they're expecting to be called with named arguments
20:26 MayDaniel_ left, dorlamm joined
TimToady the positions of parameters in BUILD and the positions of args in (a position) new have nothing to do with each other 20:27
since .bless always takes named args, not positional
and has to distribute them to multiple BUILDs
dalek p: 16638bd | pmichaud++ | Configure.pl:
Fix typo in min-parrot-revision handling.
TimToady (via BUILDALL, which is also named-only)
sorear: I don't have a strong opinion; we need to look at use cases for full type objects vs EnumMap objects 20:28
20:28 Eevee joined
dalek ok: 76b1e78 | duff++ | src/regexes.pod:
minor wording fix (daniel stojanov)++
20:28
TimToady I'm inclined to lean toward EnumMap, since it's defined 20:29
esp if a smartmatch will dwim
sorear would an anonymous enum still produce a new type?
dalek ok: c284546 | duff++ | src/regexes.pod:
Merge pull request #55 from daniel-s/master

typo in regexes.pod
masak tries to find the blog post that chronicles the switch to the current style of enum declaration
sorear my $em = enum < a b c >; $em<a>.WHAT.say 20:30
o/ masak
masak \o
strangelyconsistent.org/blog/i-can-haz-constant
sorear oh, you didn't just join
masak the use case then was 'has enum $.meth <foo bar>'
TimToady along with 'has constant $.pi = 3;' 20:31
masak aye.
the important thing with it being that the public accessor shares the enum between the class and its decendents.
descendants* 20:32
and I guess sharing the EnumMap would be enough for that. 20:33
if we wanted to share the type, we'd have made a type declaration instead.
20:34 kaare__ left
TimToady sorear: if you deref $em<a> you're typically just going to get an integer, I'd think 20:34
$em<a>:pair might return the Enum
dalek p: e8a1c1f | jonathan++ | src/6model/reprs/P6opaque. (2 files):
Extend P6opaque so it knows how to vivify containers. Should perform rather better doing things this way than Rakudo does with master; no extra lookup cost to objects that don't need the feature (like in NQP).
TimToady and both of these are independent of the decision to install a as a subtype of the whole EnumMap 20:35
sorear TimToady: well, with enum Foo <a b c>; Foo.enums<a>.WHAT eq 'Foo()'
TimToady as a separate symbol
dalek kudo/nom: bda8f95 | jnthn++ | src/Perl6/ (2 files):
Get attributes working more. Assignment now works as well as binding. Does type checks.
20:36
TimToady .<a> might return something different than bare a does 20:37
a means 'subset a of Foo where 0' or some such when used as a type
but just 0 when used as a number 20:38
sorear I thought a was just a constant
0 can be used as a type
TimToady as a subset type
sorear multi foo(0) { ... }
so why couldn't a non-literal constant?
TimToady turns into foo(Int where 0) or some such
sorear not Any where 0? 20:39
TimToady enums usually decide to be Int or Str
jnthn sorear: Certainly Int where 0
sorear: Otherwise multi sorting gets hosed.
TimToady someone probably needs to put together a matrix of ways to refer to an enum against what it means in various contexts... 20:40
pmichaud someone++
seen someone 20:41
aloha Sorry, I haven't seen someone.
pmichaud alas.
TimToady I have copious free negative time...
masak sounds like something Merlin would have... 20:44
20:45 george_z0rwell left, wamba left 20:47 wamba joined
sorear rakudo: subset Foo; 20:48
p6eval rakudo 048573: ( no output )
sorear rakudo: subset Foo; my Foo $x; say $x.perl; $x = $x
p6eval rakudo 048573: OUTPUT«Any␤»
sorear is it being interpreted as subset Foo of Any where True #OK ?
is this correct? 20:49
20:49 wamba left
TimToady probably 20:50
TimToady thinks about monkey patching subset types...
20:52 Vlavv_ left 20:53 pjcj joined 21:00 kjeldahl left 21:01 dorlamm left 21:02 tomaw_ joined
dalek ast: 00f8c3c | moritz++ | S12-attributes/inheritance.t:
attribute tests for virtual accessors vs. private storage
21:04
masak \o/ moritz++
21:05 tomaw left
masak I imagine there's a corresponding RT ticket for that test. 21:05
jnthn Yes. It's one of the oldest ones. 21:06
21:06 tomaw_ is now known as tomaw
masak I think this one is related: rt.perl.org/rt3/Ticket/Display.html?id=61500 21:08
21:09 Vlavv joined 21:27 Psyche^ joined, Psyche^ is now known as Patterner 21:29 Vlavv left
masak blog post! strangelyconsistent.org/blog/june-4-loops 21:31
21:42 Vlavv joined
masak tomorrow we'll write our first game. :) 21:43
(I practiced writing it out today just to check that all the prerequisites are in place.) :)
21:46 Psyche^ joined 21:49 Patterner left, Psyche^ is now known as Patterner
dalek kudo/nom: f0144c1 | jnthn++ | src/CORE.setting/operators.pm:
Avoid a bunch of container creation for the primitive ops.
21:58
22:09 MayDaniel joined 22:11 pochi joined
masak 'night, #perl6. 22:29
22:30 jfried left 22:35 jfried joined 22:37 noganex joined 22:40 hanekomu left 22:59 jfried left 23:16 MayDaniel left
sorear \o/ I just figured out what anon constant means 23:22
TimToady it means almost the exact same thing as BEGIN :) 23:28
23:32 rhr joined
sorear Where might I see an object of type 'Code'? 23:37
niecza: say constant $x = 2 + 2 23:38
p6eval niecza v6-56-g84360d1: OUTPUT«4␤»
sorear std: constant Foo::Bar = 3 23:39
p6eval std 4b1b100: OUTPUT«===SORRY!===␤Malformed constant at /tmp/NxsEuspAa2 line 1:␤------> constant Foo:⏏:Bar = 3␤ expecting any of:␤ coloncircumfix␤ signature␤Parse failed␤FAILED 00:01 111m␤»
sorear std: constant $Foo::Bar = 3
p6eval std 4b1b100: OUTPUT«ok 00:01 114m␤»
sorear is annoyed by the proliferation of slightly different code fragments in niecza for converting $*SCOPE + longname/variable/identifier/etc into a resolved name 23:41
23:53 daniel-s joined 23:56 Trashlord left