»ö« | perl6-projects.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot: perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 27 June 2009.
Infinoid eternaleye: Thanks for the patches. Sorry, I'm not qualified to review/apply rakudo patches, I'm more of a parrot guy 00:04
I can certainly test it tho 00:07
00:08 Whiteknight left 00:10 icwiener joined
eternaleye Infinoid: Okay, I'll pass it to moritz_ then, since he's the source of infix:<...> 00:15
It's a decidedly cool operator 00:16
And once junctive autothreading actually _threads_, there will be a lot of awesome things that can be done (like a maximally parallelized Sieve of Eratosthenes)
00:23 DemoFreak left 00:35 FCO joined
lichtkind is | also a sigil like @@ ? 00:38
00:38 silug left
TimToady nope 00:45
lichtkind why?
it makes deref in that context 00:46
TimToady @@ preserves structure when interpolated, while | takes away one level of capture 00:49
lambdabot preserves structure when interpolated, while | takes away one level of capture
TimToady you can say that again... 00:50
@@ lambdabot is an idiot
lambdabot lambdabot is an idiot
00:52 SmokeMachine left
lichtkind TimToady: thanks, in case you wonder i ask all these questions www.perlfoundation.org/perl6/index....able_index 00:53
pugs_svn r27295 | lwall++ | [STD] refix problem with broken aliasing of our vs my 00:55
r27295 | lwall++ | [STD] move symbol table code down with service routines
r27295 | lwall++ | [Cursor] call TOP by default, as documented in S05
r27296 | skids++ | Combine RI member/macro descriptions so it doesn't all have to be explained twice. 00:56
r27296 | skids++ | Sync macro parameter names with what is actually in the headers.
r27296 | skids++ | Add markup and resection a bit.
r27296 | skids++ | Correct things a bit after getting better look at the code.
00:58 nErVe joined 01:15 lichtkind_ joined 01:20 lichtkind_ left
eternaleye TimToady: Doesn't a leading | in signatures mean "unchanged capture"? e.g sub foo( |$bar ) { &baz.callwith( |$bar ) #cf Argument List Binding in S06 01:20
+} 01:21
Rakudo doesn't seem to support it, though
01:22 frew joined
eternaleye It would be very nice if it did, since infix:<...>( |$seed, Code $generator ) would DWIM on 0,1 ... &[+] as opposed to my @seed = 0,1; @seed ... &[+] 01:23
01:33 lichtkind left 01:38 snarkyboojum left 01:39 agentzh left 01:40 agentzh joined 01:42 Lorn left 01:45 nErVe left
TimToady most list infixes really need to receive two captures, I think 01:48
|$cap in a sig is currently defined to return all the rest of the capture, so it has to be the last thing 01:49
\$cap is currently defined as a single capture, but that may change to @@ or ¢ sigils
01:52 snarkyboojum joined, amoc joined 01:56 molaf_xx left, molaf_xx joined 02:15 rjbs joined 02:20 icwiener_ joined
rjbs seen moritz_ 02:20
Lordy, where's a bot when you need one?
moritz_: I'm trying to use JSON::Tiny 02:21
Well, I have no idae how I'm suppose to install or test things. 02:23
./Configure complains because perl6 isn't to be found; no idea. 02:24
02:35 icwiener left
eternaleye @seen moritz_ 02:54
lambdabot moritz_ is in #perl6. I last heard moritz_ speak 8h 42m 11s ago.
rjbs eternaleye: thanks 02:56
eternaleye rjbs: np
03:03 elmex left, elmex joined 03:17 jrockway_ is now known as jrockway
chipdude I'm unsure but given that := is for signautres does that imply you can't := an existing variable? 03:38
03:45 scottp joined
FCO (Sorry, my english isnt good). Hi, I am new to perl6, and I have a question: I saw this post in perlmonks (www.perlmonks.org/?node_id=771635) saying that I can help to write built-in methods and functions for perl6. My question is: where can I find a list of all perl6' methods and functions, and theirs definitions? 03:48
scottp Hey guys... I am just working out how to access the built in 'sha1' in parrot from rakudo perl? 03:49
TimToady FCO: see perlcabal.org/syn/ especially S32 03:53
FCO TimToady, Thanks! 03:54
TimToady chipdude: yes, you can use := on existing variables
it just makes the variable an alias for whatever is on the right
rakudo: my $a; my $b = "hi"; $a := $b; say $a 03:55
p6eval rakudo 6c43f9: OUTPUT«hi␤»
chipdude TimToady: excellent; so the 'my' is implicit for actual subroutine signatures, but in other code you have to declare the variables in the usual fashion even if you're going to := them 03:56
pugs_svn r27297 | lwall++ | [STD] document and refactor context variables for more consistency 03:57
TimToady yes, sub sigs also default to readonly, while my sigs are rw by default
otherwise binding is the same everywhere 03:58
chipdude not quite my Q. in sub foo ($a) { ... } the 'my' is implicit, whereas in other sig usage any 'my' is explicit?
TimToady yes
and parameters are the only way that "my" variables can be declared outside their block 03:59
chipdude ok, thanks
re my design problem: "I don't have an answer, but I have a more interesting name for the problem." :-) 04:01
TimToady sometimes naming the problem correctly is halfway to a solution 04:02
scottp FCO/TimToday - re: S32 - is there a way of knowing which are done and not in Rakudo without trying each?
TimToady you could look at the corresponding t/spec tests and see which ones are fudged with #?rakudo 04:03
or you can just start writing something and then you'll discover which ones aren't implemented :)
scottp ta
yes that is how I started. Probably best, as then I am testing too :-) 04:04
Don't supposed you know how to access the sha1 in parrot?
(or any way to do sha1)?
TimToady sorry, I'm parrot-stupid
scottp No prob 04:05
FCO TimToady, the t/spec is in pugs repo, right?
TimToady and is duped into rakudo 04:06
FCO: do you need a pugs repo commit bit? 04:07
FCO TimToady, thanks I found it!
04:09 Ryan52 left
FCO for test, i wrote the not method in class Object, I run make and it's OK, what do I do now? 04:31
scottp you can fork on github then push the changes 04:37
FCO but Is that right? does exist a not method on Object class? Did I understand the pod? 04:42
04:48 frew left 04:54 nihiliad left 04:58 xinming_ joined 05:05 xinming__ joined
FCO scottp, OK, done, and now? (I've never used github) 05:05
05:10 Snublefot joined 05:12 xinming left 05:13 xinming joined 05:17 alester joined, xinming__ left 05:21 xinming_ left
scottp Now what you do is push that to the owner. Just looking it up, because I forget too. 05:21
Ahh - you click "Pull Request"
Click on Rakudo and put in some text. The rakudo main user should then get a request to accept your patch. 05:22
Personally I have not actually done it, but that is the theory
05:25 xinming_ joined 05:28 icwiener_ left 05:30 xinming_ left, xinming__ joined, finanalyst joined 05:35 ihrd joined, ihrd left 05:37 xinming left 05:38 meppl joined
pugs_svn r27298 | lwall++ | [STD] various minor warning suppressions 05:44
05:51 nbrown_ joined
moritz_ rjbs: if your perl6 exec is not in $PATH, you can also run /path/to/rakudo/perl6 Configure 05:51
05:52 desertm4x joined 05:55 nbrown left, nbrown_ is now known as nbrown
pugs_svn r27299 | lwall++ | [Cursor] factor out longest token compositor to separate file 05:56
05:58 desertm4x left
pugs_svn r27300 | lwall++ | [Cursor] revert previous change, loops 06:05
06:06 synth left
TimToady std: 00 06:08
p6eval std 27298: ( no output )
06:11 xinming joined
TimToady std: 00 06:13
p6eval std 27298: ( no output )
TimToady std: 00 06:14
p6eval std 27298: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6 at /tmp/jSi4vInSNy line 1:␤------> 00␤ok 00:02 35m␤»
06:15 azawawi joined
FCO scottp, thanks! 06:15
azawawi hi
TimToady howdy 06:16
azawawi TimToady: I see a lot of STD refactoring :)
06:17 agentzh left
TimToady the only thing that might affect you is that it runs TOP by default as the top rule now, not comp_unit 06:17
pugs_svn r27301 | moritz++ | [t/spec] slurpy generator for series, eternaleye++
TimToady oh, and if you used to look at $::COMPILING::FILE, it's now just $::FILE
a few of the other context vars are also renamed 06:18
azawawi TimToady: will the symbol table be accessible once a parse is finished?
dalek kudo: d3e040f | (Alex Elsayed)++ | (2 files):
Slurpy generators for series operator

Signed-off-by: moritz [email@hidden.address]
06:18 agentzh joined
TimToady it will if we put it somewhere; alternately, the std program will dump out the symbol table for a module now 06:19
Test.pm is actually compiled down to Test.syml and that's what all the tests are using when they say "use Test" 06:20
azawawi anyway, what i really need is a token table...
06:20 rfordinal left, rfordinal joined
TimToady std: use Test; dies_ok 06:23
moritz_ TimToady: which Test.pm? pugs'? or rakudo's?
p6eval std 27300: ( no output )
TimToady neither, the Test.pm in src/perl6
moritz_ ah 06:24
TimToady basically just the names, but in Perl 6 form
moritz_ throws_ok seems superfluous since we have dies_ok
TimToady std: 00
moritz_ it's not used anywhere 06:25
p6eval std 27300: ( no output )
TimToady hmm
which feather does STD recompile on? 06:26
moritz_ not on feather
TimToady I might have broken it 06:27
std: 00
moritz_ rm: cannot remove `CORE.syml.store': No such file or directory
make: [CORE.syml] Error 1 (ignored)
p6eval std 27300: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6 at /tmp/L9BcQVTSTb line 1:␤------> 00␤ok 00:02 35m␤»
TimToady std: use Test; dies_ok
moritz_ that's the only error message I get when recompiling (at least so far)
p6eval std 27300: ( no output )
06:27 xinming__ left
TimToady std: dies_ok 06:27
p6eval std 27300: ( no output ) 06:28
TimToady you might have a looping compile in the background somewhere
std: foo 06:29
p6eval std 27300: ( no output )
06:31 iblechbot joined
TimToady std: dies_ok 06:32
p6eval std 27301: ( no output )
TimToady std: 42; 06:34
p6eval std 27301: OUTPUT«ok 00:02 35m␤»
TimToady std: dies_ok
p6eval std 27301: OUTPUT«Undeclared routine:␤ dies_ok used at 1 ␤ok 00:02 35m␤» 06:35
TimToady std: use Test; dies_ok
p6eval std 27301: OUTPUT«ok 00:02 35m␤»
06:36 mtve joined
TimToady std: use DEBUG; autolexer 06:36
p6eval std 27301: ( no output )
TimToady std: use DEBUG; autolexer 06:37
06:37 xinming left
p6eval std 27301: OUTPUT«ok 00:02 35m␤» 06:37
azawawi std: use STD_SYMBOL_TABLE; # :)
06:37 rfordinal left
p6eval std 27301: ( no output ) 06:37
TimToady std: use STD; STD::TOP 06:38
p6eval std 27301: ( no output )
TimToady std: use STD; STD::Regex 06:40
p6eval std 27301: ( no output )
06:40 xinming joined
TimToady aw, works here :) 06:40
probably times out trying to slurp in STD.pm.syml
FCO who can I mark as recipient on a Pull Request on Rakudo's github? 06:42
pugs_svn r27302 | lwall++ | [Cursor] worry about failed use statements 06:45
06:50 DanielC joined
pugs_svn r27303 | lwall++ | [Makefile] copy *.syml down to snap so we get STD.pm.syml too 06:54
TimToady std: use Blurfl; 06:56
06:56 fridim left, p6eval left
TimToady o_O 06:57
moritz_ the host seems to be unreachable, or hangs 06:58
06:58 xinming_ joined, ihrd joined 06:59 ihrd left
moritz_ just very hihg load, it seems 07:01
load average: 14.56, 10.61, 6.81
07:01 p6eval joined
moritz_ afk& 07:02
07:02 rfordinal joined
TimToady std: use NoneSuch; 07:03
p6eval std 27301: ( no output ) 07:04
07:04 xinming__ joined 07:07 xinming_ left
TimToady std: use NoneSuch; 07:08
p6eval std 27303: OUTPUT«Potential difficulties:␤ Can't locate module NoneSuch at /tmp/AILPtAKaPV line 1:␤------> use NoneSuch;␤ok 00:04 41m␤» 07:09
TimToady std: use STD; STD::Regex
p6eval std 27303: ( no output )
TimToady std: use STD; STD::Regex
p6eval std 27303: ( no output )
TimToady just takes too long to load the big .syml, I guess 07:10
07:11 xinming left 07:13 twigil joined 07:15 xinming joined 07:18 mvuets joined 07:23 ejs joined 07:24 krunen joined, xinming left 07:25 xinming joined 07:26 payload joined 07:29 xinming__ left 07:30 clintongormley joined 07:31 rfordinal left, DemoFreak joined 07:36 krunen left, alester left, krunen joined 07:40 azawawi left
jnthn morning, all 07:44
DanielC jnthn is back! 07:45
moritz_ oh hai jnthn
DanielC waves
moritz_ are you, actually?
DanielC is back too
07:45 mvuets left
jnthn Yes, I'm back. :-) 07:46
moritz_ but isn't it way too early for you to be awake? I mean come on, it's not even 10am in GMT+2 :-)
jnthn Yeah, it's odd, I just kinda found myself awake at 9am and figured, well, might as well get up.. 07:47
07:47 xinming_ joined, snarkyboojum left
moritz_ jet lag? 07:47
jnthn Unlikely, since I didn't change timezone at all on my trip. :-)
Probably just because I had to get up early for travel on the last couple of days of it. 07:48
07:49 jferrero joined
jnthn OK, so does Rakudo have to be built against an installed Parrot these days? Changes were starting to happen when I left... 07:49
07:49 xinming left
moritz_ no, still build tree 07:49
07:50 mvuets joined
jnthn ok, that's easy then :-) 07:50
jnthn gets latest Rakudo and Parrot 07:52
moritz_ I've implemented the first operator in the setting 07:53
infix:<...>
others didn't work that well
rakudo: say 1 eqv 1
p6eval rakudo d3e040: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/1IXm15AqdC:2)␤»
07:57 viklund joined, rfordinal3643 joined 08:02 pmurias joined
jnthn moritz_: Ah, I can guess why that is. 08:07
moritz_: Try removing it from the list of operators in gen_junction.pl perhaps.
moritz_ jnthn: I'll try that, thanks 08:08
(why was an entry for a not-yet-implemented operator in that script anyway? :-) 08:09
Matt-W Good morning
pmurias godd morning
jnthn moritz_: Oh, it wasn't yet implemented?
moritz_: Ah. In that case, that's more of a "hmm" then. 08:10
moritz_ jnthn: it was parsed, but there was no sub to dispatch to
Matt-W \o/ jnthn's back
08:10 drbean_ joined
jnthn moritz_: Send me the implementation if you like, I'll try and work out what's going on. 08:10
08:11 xinming_ left, drbean left
moritz_ jnthn: it works now. 08:11
08:13 xinming joined 08:14 rfordinal3643 left
dalek kudo: 13b1ff5 | moritz++ | build/gen_junction_pir.pl:
don't generate junction for infix:<eqv> which lives in the setting anyway. jnthn++
08:16
jnthn moritz_: Oh. Clearly because I'm back.
;-)
Oh, it was that problem.
OK. :-)
The reason is that Perl6MultiSub is smart enough to generate the junction dispatch multi variant and cache it "on demand".
So we don't need to generate a bunch more of them.
moritz_ rakudo: say 1 eqv 1 08:17
p6eval rakudo d3e040: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/Yz0HZqTTTk:2)␤»
jnthn Not updated yet I guess?
moritz_ bah, not yet updated
I don't understand the eqv tests 08:18
ok !([] eqv []), "eqv on anonymous array references (3)";
it looks like it tests ===, not eqv
jnthn Aye 08:19
I never 100% got eqv anyway.
08:19 snarkyboojum joined 08:21 ejs left
scottp Hey dudes. I am trying to access "sha1" - I notice it exists in Parrot, is there a way to access that version, or another, from Rakudo/ 08:21
Matt-W Someone wrote a module for that
08:22 xinming_ joined
Matt-W Puts a Perl 6 wrapper around some inline PIR to get at the Parrot functionality. Anybody remember who it was? 08:22
pugs_svn r27304 | moritz++ | [t/spec] fudge eqv.t for rakudo
viklund danielc
it's in perl6-modules on github
scottp ta
DanielC hi 08:23
viklund github.com/perl6/modules 08:24
DanielC Yeah, that's right.
Thanks viklund. I couldn't remember the URL.
viklund DanielC++ we're using the Digest module in november now, no more passwords in plain-text :D 08:25
DanielC :-D
moritz_ can I change my password in november over the web interface?
viklund (but I had to install libssl-dev on my lappy in order to make it work)
moritz_ viklund: do you use salts?
viklund moritz_: no
yes
moritz_ very good 08:26
otherwise I'd submitted a patch now :-)
scottp Thanks viklund and Matt-W, the SHA1 worked well.
moritz_ (because salts are easy to implement, and gain much)
viklund here's the commit: github.com/viklund/november/commit/...edf55a2192 08:27
scottp Since there is no "make install" in most modules, how are people dealing with multiple module usage - location of installations ?
jnthn What spectest fails are folks seeing at the moment?
08:27 cogno joined
dalek kudo: d95def2 | moritz++ | (2 files):
test infix:<eqv>. Added variant for Code objects
08:27
moritz_ jnthn: lots, actually 08:29
jnthn :-(
I was gonna say, either something is hosed on Win32 more than usual or some stuff is br0ked. 08:30
moritz_ are you using the newest parrot?
jnthn No, the one in PARROT_REVISION
But like, stuff that I know full well worked when I left is broken.
t\spec\S12-introspection\methods.rakudo 40 38 3-40
That was one of the last things I worked on before leaving, and it passed everything in there. :-( 08:31
moritz_ I'm doing a spectest now
and paste the result
jnthn Are you aware of any spectests checking for =head1 Interface Consistency
section of S12?
moritz_ takes a look what's described there 08:32
for the first paragraph there should be some 08:33
jnthn Yes, I mean the BUILD tests implicitly test this.
Maybe it'd be good to have some more explicit tests though.
08:33 drbean joined
moritz_ I thought I wrote some, but I can't find them anymore :( 08:34
08:34 xinming left
jnthn OK, I'm happy to make a couple. Is S12-class/interface-consistency.t OK as a name? 08:35
moritz_ sure
08:35 lichtkind joined 08:36 scottp left
moritz_ wait 08:37
S12-methods/interface-consistency.t might be better
08:38 explorer__ joined
jnthn Hmm, maybe 08:38
I was planning to test the is hidden bits in there too (at least, once they're implemented) 08:39
moritz_ S12-interface-consistency/methods.t
S12-interface-consistency/is-hidden.t
jnthn Perhaps, though that's explosion of test files. :-) 08:40
moritz_ that's fine
08:40 scottp joined
moritz_ merging later on is cheap 08:40
08:40 drbean_ left
jnthn true 08:40
moritz_ anyway, do as you see fit, all proposals so far were not bad
08:41 jferrero left
Matt-W How do classes export from modules? Or don't they? 08:41
08:43 zamolxes joined
moritz_ Matt-W: example? 08:44
Matt-W moritz_: well can you say something akin to class A is export {}
obviously you can't say that, or it'll try to subclass 'export'
or do you always have to say Module::ClassName 08:45
moritz_ Matt-W: class names are exported by default, I think
hm
actually I'm not sure
Matt-W: ask p6l?
Matt-W might do
they might find it more answerable than my question about adding mixins to method objects 08:46
moritz_ :-)
warnocked :/
Matt-W But I want to attach data to my methods!
how else am I goign to do it?? 08:47
and I don't seem to be able to add methods programatically except by redefining names that already exist
moritz_ I guess that's more of a Rakudo limitation than a Perl 6 limitation 08:48
jnthn You should be able to add mixins to code objects.
Matt-W jnthn: I triggered all sorts of weird bugs in Rakudo when I tried
jnthn: only one got filed, it's the one about getting different errors with different use of whitespace
jnthn rakudo: sub foo() { say 42 }; role lol { method hi { say "oh hai" } }; &foo does lol; &foo.hi 08:49
p6eval rakudo d95def: OUTPUT«oh hai␤»
08:49 mvuets left
jnthn I've no doubt there are things that don't work, but it seems that basic case does. 08:49
Matt-W yeah
jnthn But anyway, in the near-ish future we'll have user defined traits in Rakudo. 08:50
Then you can write a trait auxiliary.
Matt-W aaah
that'd be nice
I did get parts of method mixins working, but I can't remember which bits now
I've got all the code at home though
jnthn Which means you can write sub foo is wtf('omg') { } to annotate the extra data.
And the trait handler for wtf will get the 'omg' and can mix in whatever role it sees fit (if it's well behaved, the wtf role probably, or something with a $.wtf) 08:51
I think TimToady has been re-thinking trait application a bit of late, and not caught up on p6l yet.
But anyway, I do plan to implement this stuff within the next month or so. 08:52
moritz_ cool
Matt-W That is exceedingly cool
jnthn Really I'm just waiting on the spec to settle a bit, but thay may have already happened.
Matt-W That gets us something a bit like decorators doesn't it
jnthn If not, I'll badger TimToady++ on it. :-)
lisppaste3 moritz_ pasted "test summary for jnthn++" at paste.lisp.org/display/82671 08:53
Matt-W Can traits interfere with the calling of the routine?
moritz_ (that's with parrot r39796)
jnthn Yes and no.
moritz_: Matches what I see. 08:54
moritz_: Apart from t\spec\S12-introspection\methods.rakudo fails for me...and apparently not for you. :-/
Thanks.
moritz_ well, my parrot is more than 100 revisions younger than yours 08:55
jnthn Matt-W: I mean, if the trait handler takes the routine and installs a wrapper with .wrap...
Matt-W jnthn: yes and no? That's not a good 10am answer
jnthn: so they can if they want to
jnthn Then of course it's interfered with the call.
Matt-W can the inside of a routine get hold of its own object and examine it?
jnthn &?ROUTINE I think. 08:56
(nyi)
Matt-W woohoo
Matt-W adds it to 'list of things to nag people about'
jnthn That had probably better return the thing that invokes with the wrappers though.
Since they are meant to be in-place modifications.
Matt-W and if you have a wrapped routine but you don't have the handle you get back from wrap(), can you still unwrap it
jnthn as far as I could tell, you needed the unwrap handle. 08:57
Matt-W hmm
jnthn We could say that parameterless unwrap just strips off the latest wrapper or something. 08:58
Matt-W It'd be nice if you could introspect that somehow
ack, meeting time
jnthn But thing is, you can do out-of-order unwrapping (Rakudo handles that already).
And it might create weird action-at-a-distance effects to unwrap the latest one.
09:07 mvuets joined, cogno left
pugs_svn r27305 | mvuets++ | [Spec] Minor formatting fixes 09:09
09:14 azawawi joined
azawawi TimToady: redspans is not working anymore. gist.github.com/137540 09:16
09:16 azawawi left 09:21 masak joined
masak hoi! 09:21
phenny masak: 28 Jun 19:39Z <eternaleye> tell masak Why make PERL6LIB be a list of _directories_? Why not have the tools that generate a database have a switch, --global, that only works for UID 0, and everyone else passes, say, --database-location and it builds an unpriviledged database?
masak: 28 Jun 19:40Z <eternaleye> tell masak And then PERL6LIB can point at individual _databases_
masak: 28 Jun 19:41Z <eternaleye> tell masak Or even simpler, just have --database-locaton and use filesystem permissions
masak: 28 Jun 19:42Z <eternaleye> tell masak Then, @*INC can be an Array of ModuleLibrary or summat, with introspection and everything
masak whoa. :) 09:22
jnthn oh hai
masak glad to see people are thinking about the library stuff.
jnthn: hi! 09:23
I have a question about the Blob type, which is mentioned in the spec exactly once: how does one use it?
jnthn I didn't know we had a Blob type.
buubot: spack Blob 09:24
buubot Couldn't match input.
jnthn Where's it mentions?
09:24 eMaX joined
moritz_ S02 09:25
masak buubot hasn't been spacking very reliably lately... 09:26
buubot Couldn't match input.
masak my point. :)
lichtkind moin
masak lichtkind: aloha.
viklund helo lichtkind
lichtkind haha :)
jnthn ahoj lichtkind 09:27
masak saluton, moritz_, viklund.
lichtkind jnthn: ahoj jsi saz vshuru?
jnthn ...is that Czech?! 09:29
scottp Anyone got "proto" working with current Rakudo ? I get "invalid arg type in named portion of args" at lib/Ecosystem.pm:10 09:30
masak scottp: checking, hold on.
jnthn scottp: How are you trying to use it?
masak scottp: 'current' Rakudo as in bleeding or as in latest monthly?
jnthn oh wait
proto as in the installer? 09:31
masak :)
jnthn Not proto plurality thingy?
scottp current being "master' on github for both rakudo and proto
masak okie.
scottp yes re: installer
masak please hold. :)
viklund its the BUILD method!
masak jnthn: lib/Ecosystem.pm is a module in proto. it tracks all Perl 6 projects.
jnthn ah, ok 09:32
viklund remove the # in ecosystem.pm and Installer.pm
masak oh, right.
I upgraded to Pittsburgh and forgot to remove that #. 09:33
viklund yees
masak shall I make penance by committing the patch?
viklund you shall. 09:34
masak right now proto doesn't run here at all, due to that elusive 'cannot load lib' bug... :/
I'll remake Parrot/Rakudo and try again.
lichtkind jnthn: yes that was czech for, you are finally awake 09:35
viklund masak: the one only you have?
masak aye.
and feather.
09:35 mvuets left
jnthn lichtkind: I hadn't realized that the Czechs spelt Slovak so badly. ;-) 09:35
viklund feather? 09:36
masak jnthn is objective as usual... :)
viklund I run proto on feather
masak viklund: I'm doing november smokes on feather. the past month I've had that library bug there.
but maybe it'll go away if I update and rebuild...
09:40 sri_kraih_ joined
masak waitwait, this isn't how I should do this, right? 09:47
I should be mergin bleeding into master, not make new commits in master.
jnthn wtf over 400 tickets now?! 09:51
viklund merry christmas! 09:52
masak sorry... :)
jnthn masak: Nothing to be sorry for, was just a bit surprised we'd hit that number. :-) 09:53
masak it wasn't easy. :)
jnthn Won't be easy to come back down from it either, but I'll try and move things in that direction. 09:54
masak jnthn++ 09:55
09:57 payload left
masak I'm having a git problem, for once. 09:58
viklund ;)
masak trying to rebase the 'bleeding' branch on 'master' in proto.
viklund: could you try it, and see if you fare better?
I get a conflict, which to me looks silly, but still. I fix the conflict, add the file and do --continue. 09:59
but then I get the error "No changes - did you forget to use 'git add'?"
and there's no way I can continue the rebase.
Matt-W jnthn: I suppose just saying 'unwrap the last one' could muck up someone who's got a handle to that, but then you'd need a way to promise that unwrapping something that's already been unwrapped (via handle) is a no-op. But you need that anyway, because someone could easily use the same handle twice.
viklund masak: I don't think you can do that 10:00
or maybe you can, I would just cherry-pick the commit
masak viklund: do what? rebase...? oh!
no, I can't. well, I can, but then I can't push. well, I can, but then people will have problems if they pull... 10:01
masak is cascaded by realizations
10:01 sri_kraih left
masak I'll cherry-pick. 10:01
or merge. or something.
scottp Is there an example of exporting a sub?
viklund masak: it is ok to merge ;) 10:02
sometimes...
masak scottp: most of the setting.
10:02 bpetering joined
Matt-W scottp: module Foo; sub A is export { } 10:02
scottp ta
masak mergin worked! I've now done due penance. 10:03
but I still don't have a working proto. :/
viklund masak: or you could just fix it and commit, it's only a few characters 10:04
and then remove the bleeding branch, I don't think it solved any problems
masak I'll remove it.
we'll recreate it if there's a new between-monthlies divergence. 10:05
viklund masak: it isn't used, adding a comment to the source I think is better, like mberends first did
if it's not a really big change that is needed... 10:06
masak I like the idea of doing a merge after a monthly release, and just have all the changes apply to master. 10:07
but you're right, unless it's something bigger it might not be worth it.
viklund masak: then it's better to have a release two days after rakudos release ;) 10:08
and just have bleeding the default in github
masak maybe we should have regular proto releases.
that's actually a nice idea. 10:09
but in that case, we need a test suite.
and a way to mock the installation process.
bpetering does anybody have experience porting C to perl6? 10:13
masak moritz_: do you happen to know who runs dalek? 10:19
Matt-W bpetering: I'd say the best route is probably to set down precisely what the problem the C solves is and then implement a solution in Perl 6, rather than trying to port the existing code which is not likely to get you very much of Perl 6's benefit 10:21
bpetering i've already got some C code ported to p6, it parses but may not work correctly 10:22
Matt-W test suite! 10:23
masak that's what I was thinking, too. :)
Matt-W (we're big fans of test suites) 10:24
DanielC I've noticed that Perl dudes like test suites.
bpetering oh i know :)
Matt-W well we've got TAP and some good modules that use it 10:25
DanielC Perl has a lot more tests than, say, Ruby. I forget the numbers, but the difference was impressive.
Matt-W so it's really easy to like test suites
bpetering ok... so i write a test suite for the C, then get the p6 impl passing it?
Matt-W maybe 10:26
bpetering maybe?
Matt-W well depends what it is
if you're testing it as a black box external programme, you could use the same test suite for both of course
bpetering it's for the p6 test suite itself, actually
Matt-W if it's a library or something, you'd need two different ones
masak I'd write one test, then implement the p6 to satisfy that test, then repeat. :) 10:28
10:29 jferrero joined 10:31 Chillance joined
pmurias masak: you should write all your tests first and then start implementing... ;) 10:38
masak that's another way to go about it. :)
I guess that lends itself better to a consistent design. 10:39
10:42 explorer__ left
pmurias bpetering: re for the test suit itself - you are porting a C test? 10:49
bpetering pmurias: nope, porting some C code I'm hoping will turn into a test easily 10:50
it's for S29, "tests to ensure that rand has a bit of entropy 10:51
this is still in pugs/t/spec/TODO so I'm assuming it still needs to be written
it may not even pan out, but if it does it'll be my first contribution to the test suite, which is why i'm asking on here 10:52
about the only thing I'm unsure about is whether C's 'double' maps well to p6's 'Num' 10:53
moritz_ masak: Infinoid runs dalek 10:55
masak thanks. 10:56
pmurias bpetering: i think num64 would be exactlly the double 10:58
moritz_ bpetering: using Num should do if you don't rely too closely on the bit structure 10:59
bpetering well, I'm trying to port statistical code I don't really understand 11:02
but the C has no bit operations :)
moritz_ use Num then
bpetering ok 11:03
thanks 11:06
11:12 scottp left 11:14 mizioumt joined 11:18 mjk joined 11:30 xomas joined
jnthn hits a weird auto-viv issue that causes some great oddness. 11:30
(in NQP, of all things...) 11:31
moritz_ nqp does auto-viv?
11:31 skids left
moritz_ puzzled 11:31
jnthn I'm not sure 11:32
but
if $_<trait_auxiliary> { .... }
That if statement manages to modify the parse tree sufficient to upset things later on. 11:33
moritz_ ouch.
jnthn I shoulda been looking at the PAST really anyway, tbh. 11:35
But still, very odd.
ah crap, getting the .ast and looking at that also triggers it too, it seems. 11:37
hmm, wtf
11:38 xomas is now known as xomas_ 11:43 _Chillance_ joined 11:48 zulon joined
zulon hello! 11:48
moritz_ ehlo
Matt-W jnthn: that is odd. Are you implementing user-defined traits by any chance? 11:49
jnthn no
Trait related bits though
zulon I was trying to explain to some friends how the type system worked in Perl 6 (they're the kind of person with lots of prejudices about Perl)
Matt-W jnthn: I suppose it's a step in the right direction :P
zulon but I discovered that I didn't really know how &infix:<+> worked :-'
Matt-W jnthn: Really I should make the effort to learn how to help with these things
zulon so, er, what really happens when one writes "1.5" + 3 ? 11:50
Matt-W it converts "1.5" to a number of some sort, and adds it to 3
moritz_ zulon: there are various variants of that operator
Matt-W or rather, adds 3 to it
(I think)
zulon but how does it know how to convert?
moritz_ zulon: the version that's picked here is the one with the signature (Any, Any)
zulon hm 11:51
moritz_ zulon: so that will coerce both arguments to Num
zulon ok
moritz_ "1.5" -> 1.5, 3 stays (Int does Num)
Matt-W moritz_: $^a.Num + $^b.Num?
moritz_ and then then (Num, Num) multi is called on the result
zulon but how does it know how to convert a Str to a Num ?
Matt-W zulon: Str knows how to convert itself to a Num
moritz_ zulon: that's hard-coded in the Str class
zulon okay 11:52
Matt-W class Str { method Num { } }
moritz_ Matt-W: prefix:<+> or .Num, yes
zulon but er
Matt-W moritz_: oh yes I keep forgetting about prefix:<+>
zulon rakudo: say "3".Num
jnthn otoh I have got t\spec\S12-class\rw.t passing...
p6eval rakudo d95def: OUTPUT«Method 'Num' not found for invocant of class 'Str'␤»
moritz_ zulon: that should work
Matt-W jnthn++
moritz_ ie you've found a bug :-)
zulon oh :)
Matt-W rakudo: say +"3" 11:53
p6eval rakudo d95def: OUTPUT«3␤»
zulon I've contributed a tiny little bit to Perl 6 :p
Matt-W rakudo: say (+"3").perl
p6eval rakudo d95def: OUTPUT«3␤»
Matt-W yes, that's a bug
congratulations
moritz_ rakudo> say (+"3").WHAT # should be Int, is probably Num
rakudo: say (+"3").WHAT # should be Int, is probably Num
Matt-W rakudo: say (+"3").WHAT
p6eval rakudo d95def: OUTPUT«Num()␤»
moritz_ that's known, though 11:54
Matt-W But it should also have a Num method...
moritz_ aye
moritz_ submits
11:54 lichtkind left
zulon okay, thanks for the explanation 11:55
11:55 brunov left
zulon I was really confused when I saw no .Num method 11:55
jnthn Matt-W: The first thing to fix up is to get Rakudo's parsing updated to parse traits more as STD does.
I'm still not sure S14's updated status answers the "where does the rw role we dispatch on live" thing though. 11:56
Matt-W well that's what nagging is for 11:57
to get explanations :) 11:58
masak nagging++
Matt-W plans a blog post 11:59
how do I get on Planet Perl 6?
moritz_ Matt-W: write a few Perl 6 related posts, then /msg obra_
Matt-W I shall write the planned one first then 12:00
As I've only got one at the moment
DanielC There is a Planet Perl 6?
I have already written a few Perl 6 related posts.
moritz_ DanielC: planetsix.perl.org 12:01
DanielC *click* 12:02
moritz_ DanielC: URL? (to your blog, I mean)
DanielC daniel.carrera.bz
jnthn rakudo: sub foo($a) { }; foo(1, :x<1>)
p6eval rakudo d95def: ( no output )
jnthn ...surely that should die.
Parrot bug I suspect.
DanielC moritz_: My posts are infrequent (~1/week) but long. I'm not sure if that's appropriate for Planet Perl 6. 12:03
moritz_ DanielC: most of us blog with such a frequency
masak DanielC: sure it is!
DanielC ok :-)
Then please, do add me to Planet Perl 6.
obra_: ping? You are in charge of Planet Perl 6, right? 12:04
12:04 clintongormley1 joined, mjk left
moritz_ DanielC: do you have an RSS feed that only includes Perl 6 related posts (ie sorted by tag or category) 12:04
if yes, that would be preferrable
DanielC I'm sure there is a way to do that with Word Press. 12:05
moritz_ daniel.carrera.bz/category/programming/feed/ seems to be fine
DanielC ah! So that's how feeds work in Word Press... 12:06
Matt-W yeah wordpress usually provides category feeds
that's what I plan to do for mine
pugs_svn r27306 | jnthn++ | [t/spec] Add a few initial tests for interface consistency section of S12. One fudged for Rakudo due to Parrot bug.
Matt-W I've got a perl 6 category
Might even get to write this new post tonight 12:07
that'd be nice
distract me from tomorrow
pmichaud --good morning, #perl6
Matt-W hi pmichaud
DanielC I'll make a "Perl 6" category, because I might write some posts that are programming but not Perl 6.
pmichaud s/'--'//
DanielC hi pmichaud
pmichaud only here a bit before leaving for airport
DanielC pmichaud: Holidays?
pmichaud YAPC::NA, followed by a short vacation
DanielC ah
moritz_ DanielC: please do that, and /msg the feed URL to obra_ then 12:08
DanielC ok
12:08 clintongormley left 12:09 molaf_xx left, molaf_xx joined
jnthn pmichaud: Any idea at all why: 12:09
if +@($ast) >= 2 && $ast[0] eq 'trait_auxiliary:is' && $ast[1] eq $name {
That check being done would cause us to fail the isa.t sanity test?
Or more widely, fail every .isa('string') while the .isa(TypeName) still works fine? 12:10
pmichaud no. But try running with parrot -G .
I think you'll find that it passes. :-|
jnthn OMFG 12:11
You're right.
I've wasted an hour on that.
Matt-W :(
jnthn How on earth can we have a GC bug like that?
pmichaud The parrot folks have been cleaning up memory leaks in context handling, but the end result of that is that we're seeing problems in Rakudo.
especially with .isa('string')
jnthn That's a bizzare place to see it. 12:12
pmichaud agreed.
when I did my stuff working on adding 'rw' properties to containers, I was seeing the same thing (more)
jnthn I've done some fairly minor-ish changes to trigger it too. :-(
pmichaud in particular, at some point it would end up calling 'increment' on the string, so that 'Hash' was getting converted to 'Hasi' and then the check would fail.
moritz_ ouch. 12:13
jnthn erm....
I don't even want to think about how that could happen.
Matt-W oh man
pmichaud I don't know _why_ it called increment on the string.... I suspect that a pointer is being corrupted somewhere.
jnthn Epic memory corruption...
Matt-W Sounds about as fun as the bug I'm trying to track down at work at the moment
pmichaud anyway, I haven't had a chance to track it down yet.
jnthn Maybe register sets are getting re-used or something. 12:14
pmichaud but it's a _huge_ blocker for us at the moment.
jnthn While they're still alive.
Agreed.
Shit.
pmichaud (it's the one I've kept running into over the past couple of weeks)
jnthn OK, I don't remember seeing it before I went away on vacation.
Hm.
pmichaud it started appearing just then.
jnthn :-/
Matt-W It's a special welcome back jnthn bug 12:15
pmichaud anyway, if you can track it down, that'd be great. If not, I guess it'll be the subject of my Rakudo day tomorrow.
jnthn That's really odd.
Matt-W it must be something going pretty crazy
pmichaud I'm planning to do two Rakudo days this week to make up for missing one last week (with YAPC::NA)
Matt-W the GC presumably thinks it's incrementing something else
jnthn Wait, so is your flight now back home from YAPC::NA + vacation?
pmichaud yes. 12:16
jnthn Ah, OK.
I plan to do a Rakudo day this week too.
Any preference on when?
More generally though this week I'm working on grant stuff too. 12:17
12:17 clintongormley1 left
jnthn Also, what should I do with my patches that trigger the GC bug? Hold off until it's fixed? 12:17
moritz_ jnthn: maybe a branch? 12:18
pmichaud no preference on rakudo day. I should be around all week.
hold off on the patches until I get a chance to look at it tomorrow, I guess.
I may have to start bisecting parrot. 12:19
anyway, I'd say we only hold the patches for a day.
moritz_ if you bisect, use a git copy of parrot 12:20
jnthn I've got them committed locally, so can just push the bunch later when we're happy things are fixed up.
moritz_ much faster than with svn :/
pmichaud if after tomorrow we're still not able to track it down, then we'll go ahead and apply the patches
moritz_++ # good idea
anyway, time for me to depart for airport. I'll be back in a few hours (likely while waiting for plane ... pittsburgh has free airport wifi) 12:21
bbl
jnthn safe journey
Matt-W oooh free wifi
all airports should have that
jnthn is very happy that both of the ones near to him do 12:22
masak wow, I had forgotten about Rakudo Days! wohoo!
Matt-W London Stansted doesn't
neither does Basel
Matt-W paid €stupid for wifi at Basel when he was stuck there for six hours once
still, stopped me going mad 12:23
jnthn Brussels not only didn't have free wifi, but would only sell something like a day pass for like 20 euros or something insane.
Matt-W yup that's normal in European airports
jnthn Maybe my little bit of Europe is just less retarted.
Bratislava and Wien both have free wifi.
Always have since I moved here.
avar Keflavík Airport used to be my favorite int airport. They had comfortable seats you could sleep on, free wifi and an environment that didn't look like something cut out of a dystopian "everything must be glass & silver with bright lights" movie. They've now rectified all three. 12:24
Matt-W jnthn: the enlightenment comes to eastern europe before the rest, obviously
jnthn: although to be fair, in the case of Heathrow I'd rather they make little things like the baggage handling system work before they worry about free wifi
12:26 mvuets joined
jnthn Heathrow is such a failport. 12:26
OK, I need lunch and to do $other_job for a while... 12:27
12:27 skids joined
jnthn In my local currently uncomittable patches, is rw on classes now works (makes all accessors is rw by default), is hidden surpresses generation of *%_ and also .signature has the *%_ in it properly for when it is added. 12:27
12:27 clintongormley joined
Matt-W hmm 12:29
Matt-W will have to read up on is hidden
moritz_ jnthn: git checkout -b uncommitable; git push origin uncommitable
obra_ pmichaud: ping? 12:30
moritz_ then we can look at it too :-)
Matt-W obra_: he's gone to the airport 12:31
obra_ ah :) 12:32
masak if a module exists in the database in the same version but by two different authors, and a program has no requirements on which author's module to use, how will the choice be made? or will the program refuse to run? 12:33
12:34 mizioumt1 joined
DanielC masak: That's probably left to the implementation, but I think that making the program not run is probably the wrong solution. 12:35
masak me too.
pmurias jnthn: rakudo's multi dispatch works by sorting the variants beforehand and failing if two thing of equal/uncomparable specificness match?
DanielC masak: I think I'd go for the most recently installed, but that means that the implementation has to keep track of the install date. 12:36
masak DanielC: I was just going to say 'the oldest installed'.
jnthn pmurias: At the moment, we sort them the first time we need to do a dispatch and keep hold of that computed order.
DanielC masak: Ok. Honestly I can't think of any good reason to choose one or the other.
masak that way, behaviour doesn't change when things are added to the database.
DanielC ah
masak feels saner. :)
DanielC That's a good reason. 12:37
It makes the programs more predictable.
yeah
jnthn Then we know we have dupes if we find on unique solution at the same "narrowness level"
See do_dispatch in src/pmc/perl6multisub.pmc
moritz_ maybe we can do multi dispatch with module name, auth and version? :-)
jnthn There's a lot of comments.
So you can probably get a good sense of the algorithm from that rather than having to read the code. :-)
DanielC But if there are multiple versions available, the implementation should pick the latest one, right? 12:39
use Foo; <-- Rakudo grabs the highest-number version of Foo available.
moritz_ presumably 12:40
or maybe we can just set a default per module name
obra_ I'm presuming that module resolution algorithms will be pluggable and program-selectable.
moritz_ like debian's update-alternatives
DanielC So, the general rule becomes: Pick the latest version that matches the 'use' statement, and if there is more than one installed, pick the one that was installed first. 12:42
12:42 icwiener joined
masak moritz_: perlgeek.de/blog-en/perl-5-to-6/24-...rator.html -- I think you might want to reverse the order of the two elsif conditions, so that the third will have a chance to execute. 12:42
it's just an example, I know, but it's more convincing if it's a correct example. :) 12:43
moritz_ masak: I'll take a look... I'll take it you're more than half a year behind with your firefox tabs? :-)
masak moritz_: no, just over a month. :) 12:44
but some posts keep re-appearing for different reasons. and sometimes I read them again.
12:46 Lorn joined
moritz_ masak: thanks, fixed 12:47
12:54 mizioumt left 12:56 bpetering left 12:58 rjh left 13:02 synth joined 13:04 DemoFreak left 13:12 zulon left
rjbs moritz_: In the final "or" in t/04-roundtrip.t, it should be: or say "# Got: {$r.perl}\n# Expected: {$_.value.perl}"; 13:16
not $_.perl
rjbs can't tell why it's failing.
Is this in git somewhere? 13:17
moritz_ rjbs: do you have a github account?
rjbs I do.
rjbs
moritz_ github.com/moritz/json/tree/master
rjbs Cool, will poke more later; time to get into the office.
moritz_ rjbs: you're a committer now; feel free to fix whatever you encounter :-) 13:18
13:21 particle-264b joined 13:22 mvuets left, particle-264b is now known as particle-on-suga, particle-on-suga is now known as particle-sugaros
particle-sugaros just created a sugaros vm, and will soon attempt to build rakudo here 13:23
13:26 snarkyboojum left
jnthn sweet 13:26
13:27 rjh joined
Matt-W nice 13:27
13:32 mvuets joined 13:41 ejs0 joined
rjbs pushes that fix, will see if he can figure out that bug later. 13:42
13:49 ruoso joined, azawawi joined
azawawi hi 13:49
13:51 azawawi left
masak azawawi: bye? :) 13:52
ruoso hello1 13:54
13:54 nihiliad joined 13:57 KyleHa joined 13:59 twigil left
pmurias ruoso: hi 14:01
ruoso: how did you talk go?
* your 14:02
ruoso very well...
I'll be posting about it (with slides) very soon 14:03
14:03 PacoLinux joined 14:06 gbacon joined
pmurias ruoso: after i get signature sorting working what should i work on? 14:08
ruoso pmurias, do the multi sort the candidates already? 14:14
14:15 kidd_ joined
pmurias not yet 14:16
ruoso I think that would be a good thing to do
pmurias i asked about the next thing ;)
ruoso ah... 14:17
now I read it right
I think you could work on the module improt
pmurias the current scheme (see lib/Test.pm) is that use calls EXPORTALL on the package object with the scope where it import stuff to as the argument 14:19
ruoso I still need to look that... 14:20
just got back to work today
14:22 ejs0 left
pmurias ok, i had a cold and was preparing for my last exam tommorrow so i didn't much done lately 14:22
rakudo: multi foo(Int $a,$b?) {say "#1"};multi foo($a,Int $b?) {say "#2"};foo(1) 14:23
p6eval rakudo d95def: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Int $a, Any $b?)␤:(Any $a, Int $b?)␤in Main (/tmp/XDJ2KRXJ70:2)␤»
jnthn Think that's right - those two candidates are tied in the sort, and both accept one parameter. 14:25
pmurias that's a bug 14:26
jnthn Why?
pmurias in that case the first one is most specific
jnthn Why?
Remember the sort is independent of the parameters that are passed. 14:27
pmurias is it specced that way
?
jnthn Yes.
The point is that we sort once.
And use that ordering for all dispatches. 14:28
Unless we want to add some other level of tie-breaking specific to optionals...but I don't see anything like that in the spec.
The sort isn't cheap, thus why we want to be able to do it once, and have it invariant (unless another candidate comes to exist at runtime somehow, but that is evil). 14:29
masak is the MMD exposed in any way? could it theoretically be replaced in a module? 14:30
Matt-W oh of course 14:33
you dynamically generate methods in code by doing it in a macro
Matt-W bangs his head on the desk
Matt-W then books a flight on the next time machine to after Rakudo has macros
jnthn class MyMulti { has @!candidates; method postcircumfix:<( )>(|$args) { ... } } # or some such 14:34
pmurias jnthn: the reason i thought that behaviour was erroneuous is because the first variant matched the arguments more closely 14:35
jnthn pmurias: Aye, I follow your line of thought.
I don't see anything in the spec that suggests different mind. 14:36
That is, that says if optional parameters make the sort any different.
pmurias it depends if multi dispatched is specced to be (or behave like it is) implemented by sorting the candidate list 14:38
jnthn Oh, I'm quite sure it's spec'd to sort the candidate list statically.
I'd considered that one of the underlying design principles.
TimToady if we can't sort statically, we're completely hosed performance-wise 14:39
pmurias so do you officially declare that behaviour correct? 14:40
or do we register to candidates on with the other withought the optional argument?
TimToady let me backlog and coffee (not necessarily in that order) before I say anything more specific and/or stupid 14:42
14:42 nihiliad left
pmurias ok 14:43
14:44 frew joined 14:45 nihiliad joined
pmurias train& 14:46
14:46 pmurias left
TimToady say {"b" => 2, "a" => 1}.perl eq { a => 1, b => 2}.perl 14:48
rakudo: say {"b" => 2, "a" => 1}.perl eq { a => 1, b => 2}.perl
p6eval rakudo d95def: OUTPUT«0␤»
TimToady jnthn: if .perl were to sort its hash keys, that would implement eqv 14:49
slowly, but correctly
14:49 ejs joined
TimToady rakudo: say {b => 2, a => 1}.perl eq { a => 1, b => 2}.perl 14:50
p6eval rakudo d95def: OUTPUT«0␤»
moritz_ ok, that means that some of the tests are simply wrong
for example [] !eqv []
TimToady those should be eqv
moritz_ aye
but what about \@a eqv \@b
14:50 KyleHa left
moritz_ doesn't the capture contain the variable names somehow? 14:50
14:51 clintongormley left
TimToady yes, I'd think so, since the identity is part of the "value" there 14:54
or we could never bind rw
moritz_ so \@a !eqv \@b for all @a, @b
ok, I'll fix the tests 14:55
TimToady unless @a === @b
14:55 KyleHa joined
ruoso from one meeting to another, then to a work lunch, then to another meeting... 14:55
ruoso wonders if he's going to work today...
moritz_ ok
TimToady or @a =:= @b rather, maybe 14:56
TimToady is still looking around for a brane
rakudo: my @a = 1,2,3; say (\@a).perl 14:58
p6eval rakudo d95def: OUTPUT«[1, 2, 3]␤»
TimToady that seems to lose the @a-ness however
which seems to be a bug
moritz_ aye
TimToady except maybe capture-of-one-item is getting us 14:59
rakudo: my @a = 1,2,3; say (\@a, \$_).perl
masak rakudo: my @a = 1,2,3; say [\] @a
p6eval rakudo d95def: OUTPUT«[[1, 2, 3], undef]␤»
rakudo d95def: OUTPUT«say requires an argument at line 2, near " [\\] @a"␤in Main (src/gen_setting.pm:2416)␤»
moritz_ so what would you think that (\($a, \@b)).perl should look like?
TimToady also possible that .perl is misspecked 15:00
moritz_ I mean it's hard to emit both the value and the variable name
std: \$a
p6eval std 27306: OUTPUT«Potential difficulties:␤ Variable $a is not predeclared at /tmp/74IZ27ewfR line 1:␤------> \$a␤ok 00:02 36m␤» 15:01
TimToady masak: you can't use reduce on a unary operator
on top of which, \ isn't a unary operator really
masak TimToady: yes, I realised.
would \<< work? 15:02
TimToady though I'm curious
std: my @a = 1,2,3; say [\] @a
p6eval std 27306: OUTPUT«##### PARSE FAILED #####␤Unable to parse array composer; couldn't find final ']' at /tmp/Txk4kpbUf0 line 1:␤------> my @a = 1,2,3; say [\] @a␤ expecting any of:␤ capterm␤ prefix or noun␤ standard stopper␤ terminator␤FAILED 00:03 40m␤»
TimToady that's...funny
KyleHa Yeah, I giggled. 15:03
TimToady masak: no, \ isn't an operator
well, maybe it is
ENOBRANEYET 15:04
masak it sure looks like one.
even = can be []-ed over...
obra_ it's always confusing when someone fails with that error code, as it triggers my nick hilighting
masak :)
obra_: bet it happens a lot.
TimToady no, it's just a <capterm> 15:05
ruoso lunch 15:06
15:06 ruoso left
TimToady std: use STD; STD::Regex 15:07
p6eval std 27306: OUTPUT«ok 00:02 35m␤»
TimToady yay!!
std: use STD; STD::NoneSuch 15:08
p6eval std 27306: OUTPUT«Undeclared name:␤ STD::NoneSuch used at 1 ␤ok 00:02 35m␤»
mvuets Is 'std' some grammar parser or what?
moritz_ it's the standard grammar, yes
TimToady it's what is running when you say std: here
it's actually running a version that has been translated automatically to Perl 5 15:09
mvuets I mean what is behind that bot?
Maybe i'll find it useful to use locally (:
TimToady the actual program is probably "tryfile" in src/perl6 (pugs repo(
moritz_ svn.pugscode.org/pugs/src/perl6/STD.pm that's the grammar it uses
TimToady *) 15:10
moritz_ you need a perl 5.10 in /usr/local/bin/perl and then type 'make'
(in src/perl6/ )
and a few modules, like Moose
TimToady this weekend I hacked in the ability to pull in .pm symbol tables via .syml files, and the ability to emit .syml files when parsing .pm or .setting 15:11
mvuets Oh, ok. So it can be used to check just syntax, right?
TimToady and the CORE.syml is now automatically generated from CORE.setting, which is P6ish
moritz_ right
mvuets Thanks guys.
TimToady mvuets: so far, just syntax
that will change pretty soon, as soon as I finish making viv replace gimme5 15:12
alternately, you can consider that mildew is already executing the output of STD 15:13
moritz_ TimToady is on his crusade to implement Perl 6 single-handedly :-)
mvuets TimToady, wtf mildew?
moritz_, (: 15:14
TimToady mildew: say "hi mvuets!"
p6eval mildew: OUTPUT«hi mvuets!␤»
TimToady that's using STD and smop, I believe
moritz_ it does
mvuets Another implementation? 15:15
TimToady though I believe it's compiling directly from the match tree rather than the ast tree as viv is aiming for; could be wrong about that
depends on how you count implementations, which is a fuzzy concept 15:17
if we all agreed on an AST format, we could play mix and match with frontends and backends
masak rakudo: class Meter { has $.n; method new($n) { self.bless(*, n => $n) } }; multi postfix:<m>(Num $a) { Meter.new($a) }; multi postfix:<km>(Num $a) { Meter.new(1e3*$a) }; multi infix:<===>(Meter $a, Meter $b) { $a.n == $b.n }; say 1000m === 1km 15:18
p6eval rakudo d95def: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/Jci8aFRkSS:2)␤»
masak oh well.
15:18 gfldex joined, particle-sugaros left
masak rakudo: class Meter { has $.n; method new($n) { self.bless(*, n => $n) } }; multi postfix:<m>(Num $a) { Meter.new($a) }; multi postfix:<km>(Num $a) { Meter.new(1e3*$a) }; multi infix:<=-=>(Meter $a, Meter $b) { $a.n == $b.n }; say 1000m =-= 1km 15:19
p6eval rakudo d95def: OUTPUT«1␤»
masak \o/
mvuets Oh, too much unknown abbreviations for the moment. Forget that (:
masak mvuets: for what it's worth, I know the feeling. 15:20
one grows into it.
moritz_ AST = abstract syntax tree
masak the black magick of parsing kinda has its own language.
Matt-W parsing is fun
TimToady not parsing is even more fun 15:21
Matt-W -> music-making -> home -> food -> thinking about Perl 6
moritz_ mvuets: you can also view the IRC logs online (see /topic), it explains some of the abbreviations as tooltips
mvuets moritz_, good idea.
TimToady std: [cmp] 1,2,3 15:22
p6eval std 27306: OUTPUT«##### PARSE FAILED #####␤Can't reduce a nonchaining operator because it's diffy and not chaining at /tmp/uSidnuwYkT line 1:␤------> [cmp] 1,2,3␤ expecting prefix_circumfix_meta_operator__S_290reduce␤FAILED 00:02 36m␤»
15:23 ejs left
TimToady or this one 15:23
std: for map {$_+1}, 1,2,3, { .say }
p6eval std 27306: OUTPUT«##### PARSE FAILED #####␤Function 'map' needs parens to avoid gobbling block at /tmp/8pKKfhm8iB line 1:␤------> for map {$_+1}, 1,2,3, { .say }␤Missing block (apparently gobbled by 'map') at /tmp/8pKKfhm8iB line 2:␤------> ;␤ expecting any of:␤
..parame…
15:23 lichtkind joined
TimToady you know, the place where p6eval truncates is either too short or too long 15:24
moritz_ TimToady: just add an option for a shorter error message
TimToady it should either do one message or two full messages, not one message and a little bit of a second
moritz_ TimToady: the ----> pointers are pretty useless on IRC anyway
TimToady they look fine in irssi 15:25
lichtkind TimToady: if | is no sigil so thenn all the other context forcer like ? ~ + are also no sigil
moritz_ since the \n isn't a real linebreak in irssi, it doesn't point anywhere (at least here)
TimToady std: for map {$_+1}, 1,2,3, {␤.say;␤} 15:26
masak TimToady: the [cmp] example just made me understand why we have 'diffy'.
p6eval std 27306: OUTPUT«##### PARSE FAILED #####␤Function 'map' needs parens to avoid gobbling block at /tmp/EFg9CFeKhg line 1:␤------> for map {$_+1}, 1,2,3, {␤Missing block (apparently gobbled by 'map') at /tmp/EFg9CFeKhg line 4:␤------> ;␤ expecting any of:␤
..parameterized…
TimToady it really ought to translate "line 4" back to EOF at the last minute 15:27
15:27 jferrero left
TimToady lichtkind: correct 15:27
mvuets masak, does yarn work somehow already? 15:28
TimToady nobody ever considered those to be sigils
masak mvuets: well, it worked for making posts.
mvuets: might have bit-rotted since then. 15:29
lichtkind TimToady: thanks but what is their correct name ?
masak mvuets: mberends++ said he'd do a complete rewrite and start using it for blogging.
moritz_ lichtkind: they are prefix operators 15:30
TimToady lichtkind: depends on how specific you want to be: contextualizers or prefix operaotrs
masak -> store -> home -> swimming -> home -> thinking about Perl 6
TimToady spell it moritz_'s way though :)
15:30 masak left
lichtkind TimToady: i ask because i want to categorize them properly in appendix B, looks like they should get a subkat: contextualizers under operators 15:31
mvuets I guess it is possible to leave a message for offline one via a bot: how? "tell <nick> blah"?
moritz_ phenny, tell mvuets like that 15:32
phenny moritz_: I'll pass that on when mvuets is around.
TimToady but don't bother with people who always backlog, like me :)
don't worry about that in advance; we'll tell you if you forget :) 15:33
moritz_ or me, a hilight is usually enough
TimToady moritz_: class A is export {...} is fine
as long as you don't have a type named "export"
moritz_ ok 15:34
mvuets I wanted to tell masak something, but he has loged off. I think hilight will not help here.
phenny mvuets: 15:32Z <moritz_> tell mvuets like that
moritz_ mvuets: right, use the bot then
mvuets TimToady, sorry, what "backlog" means? My dictionary does not contain it (=
TimToady reading back through everything that was said overnight 15:35
or while one was gone
I currently have irclog.perlgeek.de/perl6/today up in another window to see what happened while I was asleep
my response to moritz_ on "class is export" tells you where I've gotten to in my backlogging :) 15:36
moritz_ TimToady: ... and that you didn't get far enough to notice that it wasn't my question, originally :-)
mvuets Ah, well (:
TimToady Matt-W: see ^^^
moritz_: sorry :) 15:37
moritz_ no problem
TimToady but I can tell you the class names don't export by default
I think only multis do that currently 15:38
mvuets Are all these bots somewhere mentioned on the web?
moritz_ I don't think so
TimToady and possibly methods, but maybe we should rename method...is export to somethign else
moritz_ feel free to summarise it an tell the URL, though :-) 15:39
TimToady: is it really a good idea to export multis by default?
mvuets moritz_, OK (:
moritz_ I mean a verb can mean two totally different things in different contexts
TimToady their purpose in life is generally to show up in lots of places 15:40
most MMD systems make them global
moritz_ Perl 6 does not resemble most systems :-)
TimToady Perl 6 is about picking sane defaults, and I think this might be one of them :) 15:41
moritz_ so if you want two versions of one module, you have to explicitly tell it not to export its multis?
I mean if you use two modules, A and B
and A depends on C version 1
and B depends on C version 2
if C version 1 and 2 have similar multis defined, and the authors of A and B weren't that careful, you have a problem, no? 15:42
TimToady if you get a tied dispatch, you'll have to disambiguate
mvuets phenny, tell masak I'm thinking about a try to write my own blogging software in Perl 6. Thus want to learn Perl 6 practically and make it as my degree work.
phenny mvuets: I'll pass that on when masak is around.
TimToady in some cases this will even be determinable at compile time
(the fact that it will fail, we always know there's a tie, and could warn) 15:44
15:44 KyleHa left
TimToady but I think biasing multis in the direction of too many rather than too few will minimize the FAQ count 15:45
unless we start emitting messages like "module X could have exported multi foo, and then your program would have blown up differently" 15:46
15:46 finanalyst left
pugs_svn r27307 | moritz++ | [perl6-projects.org] remove two blogs that are on the planetsix aggregator 15:47
15:47 KyleHa joined
jnthn TimToady: While I was away, did you get to thinking any more about where the roles for trait names go? 15:48
I'm going to start getting Rakudo using the combined trait_mod thing.
dalek ok: 5b7798e | (Hinrik Örn Sigurðsson)++ | (2 files):
Update README
TimToady I think S14 is now closer to the truth 15:49
jnthn Yes, I noticed the updates there. They looked good, and are starting to sink into my branes.
But I didn't see an answer to the "where does the role rw { } that maps to "is rw" go?" 15:50
moritz_ in the setting?
TimToady it's still a little bit fuzzy how the new word gets installed in the outer syntax
some syntax needs exporting somewhere, probably 15:51
jnthn moritz_: The problem is more that we maybe don't want to pollute the namespace with things like rw
TimToady and importing a category:<symbol> needs to mod the current syntax that's doing the importing
moritz_ jnthn: aye. I'd also wish we didn't polute so much of Any...
TimToady Matt-W: the question seems odd to me; you can mixin to any object, and a method is an object, but the mixing in has nothing to do with the fact that it's a method, and everything to do with the fact that it's an object 15:52
moritz_ hm, maybe a different slang that contains trait names? 15:53
TimToady it's just the trait_mod category
a category is a kind of slang
15:53 silug joined
TimToady just one that is recognized in a particular syntactic slot 15:54
moritz_ I didn't fully understand slangs either, mind you :-)
TimToady anyway, installing trait_mod:<rw> in the user's grammar ought to be sufficient somehow; doesn't need a full-blown language braid 15:55
and rw will presumably already be installed by the CORE setting 15:56
15:56 _Chillance_ left
moritz_ is there a good reason to keep the underscore in trait_mod and similar identifiers? a hyphen would be much nicer, IMHO 15:56
TimToady hyphens are more user-landy; underscores more impl-landy 15:57
moritz_ ok
jnthn TimToady: I'm confused. traid_mod:<is> is the one that handles "is rw", no?
TimToady and anything we can do to discourage people from using the wonderful features of Perl 6 is all to the good. :) 15:58
yes, I'm probably confused too :)
jnthn More coffee!
TimToady so it's trait_mod:<is> that is installed in CORE
15:58 Chillance left
jnthn Right, which is fine. 15:59
TimToady but the multis also have to be visible/exported
jnthn But is rw needs some "rw" thingy to dispatch on.
A role or a class.
15:59 particle-2978 joined 16:00 particle-2978 is now known as particle-sugaros
TimToady yeah, that's currently xxx in S14 :) 16:00
jnthn aww.
TimToady maybe it's just "rw" as a value match
jnthn That'll miss the MMD cache. 16:01
(e.g. not be fast)
TimToady traits are called primarily at declaration time
so it would mostly only slow down the compile 16:02
jnthn True, though we'd like our startup time not to suck.
Rakudo is going to need to apply them at startup for the foreseeable future, I suspect.
TimToady well, strings are immutable, so seems like we could optimize it somehow
jnthn True. 16:03
TimToady I am told by the Powers That Be that now would be the correct time to take my shower with respect to the laundry cycle :)
later & 16:04
obra_ Say hi to the Powers for me
TimToady said
obra_ :) Thanks. /me waves 16:05
16:05 rfordinal joined 16:06 _jaldhar left 16:15 cdarroch joined
mvuets What 'bootstrapped' means when one talks about perl compilers? 16:18
16:20 alester joined
moritz_ mvuets: that it can compile itself 16:20
mvuets Kinda Lisp is written in Lisp?
16:21 zamolxes left
moritz_ right 16:21
16:23 cls_bsd_ joined 16:25 iblechbot left 16:26 cls_bsd left
lichtkind TimToady: but @@ is a sigil? 16:29
16:33 rfordinal left
jnthn OK, so now my latest changes hide the GC issues as much as they were hidden when I pulled this morning. Epic heisenbug... 16:33
Well, push...
TimToady lichtkind: yes, possibly it's really the same as ¢, the capture sigil
but maybe not
since slices are only one level deep of sublists 16:34
but maybe unpacking a capture that was is just operational, and not contextual
s/was/way/
lichtkind TimToady: oh captures have sigils, i missed that 16:35
TimToady not specced yet, really, but likely 16:36
in which case a sig's \$cap becomes ¢cap
or ¢ap :) # "ap" == argument pointer 16:37
16:38 dalek left
lichtkind TimToady: nah as long it isnt specced i ignore it :) 16:38
16:38 dalek joined
jnthn awww...my commits made dalek flood! 16:38
mvuets rakudo: my @a=1..10; for @a -> $odd, undef { say $odd } # just recalled one my question: i expect this to be worked, why not? 16:41
p6eval rakudo d95def: OUTPUT«Statement not terminated properly at line 2, near "-> $odd, u"␤in Main (src/gen_setting.pm:3225)␤»
16:42 Psyche^ joined, DemoFreak joined
TimToady rakudo: my @a = 1..10; for @a -> $odd, Object { say $odd } 16:43
p6eval rakudo d95def: OUTPUT«1␤3␤5␤7␤9␤»
16:43 Patterner left, Psyche^ is now known as Patterner
TimToady there's no such thing as undef in Perl 6, actually 16:43
moritz_ mvuets: 2 ~~ undef is not true
jnthn rakudo: my @a = 1..10; for @a -> $odd, * { say $odd } 16:44
p6eval rakudo d95def: OUTPUT«Statement not terminated properly at line 2, near "-> $odd, *"␤in Main (src/gen_setting.pm:3225)␤»
moritz_ if you want to ignore a scalar, use a $ instead
jnthn ooops
rakudo: my @a = 1..10; for @a -> $odd, $ { say $odd }
moritz_ rakudo: my @a = 1..10; for @a -> $odd, $ { say $odd }
jnthn is what I meant :)
TimToady you can't use * in a sig like that
p6eval rakudo d95def: OUTPUT«1␤3␤5␤7␤9␤»
jnthn TimToady: Aye. I'm rusty from vacation. :-)
TimToady you can assign though, in theory
mvuets TimToady, but it is. Temporary?
TimToady rakudo: my $a; ($a,*,$a) = 1..3 16:45
p6eval rakudo d95def: ( no output )
TimToady std: my $a; ($a,*,$a) = 1..3
p6eval std 27307: OUTPUT«ok 00:02 38m␤»
jnthn TimToady: I see trait is either a trait_mod or a colonpair
mvuets rakudo: my $a; (undef, $a) = (1, 2); say $a
p6eval rakudo d95def: OUTPUT«sh: ./perl6: No such file or directory␤»
jnthn What is the colonpair version for?
And how does it map to a dispatch? 16:46
TimToady std: sub foo ($a,$b,$c) :rw {...}
p6eval std 27307: OUTPUT«ok 00:02 37m␤»
TimToady same as "is rw"
jnthn OK, so it's like an is
TimToady actually, is is like a :
jnthn ? 16:47
TimToady I think of the "is" as the syntactic sugar for :
but it's okay to think of it the other way around too
jnthn OK, but it will call trait_mod:<is>($thingy, rw) no?
TimToady yes 16:48
mvuets rakudo: my $a; (undef, $a) = (1, 2); say $a # once again
p6eval rakudo d95def: OUTPUT«sh: ./perl6: No such file or directory␤»
jnthn OK, good.
TimToady rakudo: my $a; (*, $a) = 1,2; say $a # should work
p6eval rakudo d95def: OUTPUT«2␤»
TimToady does work
but use $ or Object or Any in a signature 16:49
mvuets As i understand, undef in Rakudo is just a cheat.
TimToady std: my $a; ($, $a) = 1,2; say $a # should work
jnthn TimToady: How strongly do you think the "we pass the name of the trait" is an option?
p6eval std 27307: OUTPUT«##### PARSE FAILED #####␤Obsolete use of $, variable; in Perl 6 please use .join() method instead at /tmp/tCcBbjLxnc line 1:␤------> my $a; ($, $a) = 1,2; say $a # should work␤FAILED 00:02 36m␤»
TimToady std: my ($, $a) = 1,2; say $a # should work 16:50
p6eval std 27307: OUTPUT«ok 00:03 39m␤»
jnthn It does present a bit of a problem in the case of say 16:51
mvuets I see. Thanks.
jnthn my class Foo { }; my class Bar is Foo { }; # can't really pass "Foo" here, at least not unless we want to be doing funky lookup stuff.
TimToady the compiler knows Foo is a class, so could call differently 16:52
jnthn "If it's a typename look it up and pass it; if not, pass the string"?
TimToady if it's a typename; you've already looked it up :)
jnthn ;-) 16:53
16:53 DanielC_ joined
TimToady actually, might just pass a Pair for the other 16:53
so rw ends up the key
just as with :rw
or :!rw
std: sub foo ($x) is !foo {...}
p6eval std 27307: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/oUA55qkgGp line 1:␤------> sub foo ($x) is !foo {...}␤ expecting name␤FAILED 00:02 37m␤» 16:54
TimToady hmm
std: sub foo ($x) :!foo {...}
p6eval std 27307: OUTPUT«ok 00:02 37m␤»
TimToady thought that worked, oh well
std: sub foo ($x) is foo<this part is parsed as adverbial> {...} 16:55
p6eval std 27307: OUTPUT«ok 00:03 37m␤»
TimToady must require \w there at foo, I guess 16:56
std: sub foo ($x) :$foo {...}
p6eval std 27307: OUTPUT«ok 00:02 37m␤»
TimToady (would require $foo to have compile-time value)
but same as 16:57
std: sub foo ($x) is foo($foo) {...}
p6eval std 27307: OUTPUT«Potential difficulties:␤ Variable $foo is not predeclared at /tmp/zvCTBFzG0I line 1:␤------> sub foo ($x) is foo($foo) {...}␤ok 00:02 38m␤»
16:57 payload joined
TimToady ooh, :$foo doesn't check to see if $foo exists # BUG 16:57
jnthn aye 16:58
TimToady std: sub foo ($x) is foo($x) {...} # nonsensical
p6eval std 27307: OUTPUT«ok 00:02 38m␤»
TimToady std: sub foo ($x) is foo(foo($x)) {...} # also nonsensical 16:59
p6eval std 27307: OUTPUT«ok 00:02 38m␤»
TimToady but syntactically legal
std: sub foo ($x) :foo(foo($x)) {...} # same thing
p6eval std 27307: OUTPUT«ok 00:02 38m␤» 17:00
KyleHa rakudo: sub a { state $x //= 3; $x++; say $x }; a(); a()
p6eval rakudo 1831bd: OUTPUT«4␤4␤»
TimToady so I think we can get rid of the optional $arg? in trait_mods
it's just the value of the pair
jnthn And then you write a kind of
multi trait_mod:<is>($declarand, Pair $p where { .key eq 'rw' }) { ... } 17:01
TimToady wonder if we could force it to be a named arg...
jnthn Remember that named args do not participate in multiple dispatch.
TimToady I know we don't mmd on that 17:02
but it's still a constraint on matching
jnthn Rakudo's MMD completely ignores named parameters at the moment.
TimToady you have to bind and succeed
jnthn I thought that's what was meant by them not participating in the dispatch.
OK, but that's an "after MMD gave us the candidate to call" thing, no?
17:03 justatheory joined
TimToady it would be relatively easy to weed out the candidates that can't possibly match at compile time 17:03
(for a given call, not for the &foo candidate list) 17:04
jnthn As an optimization, I guess, yes.
TimToady when we say "doesn't participate in mmd" we really mean doesn't contribute to the sort order
jnthn I'd always taken it as the multi-dispatcher didn't care about named parameters. 17:05
TimToady but sooner or later you have to match the capture to the sig
the multi-dispatch has to care about failed bindings
17:05 icwiener_ joined
TimToady otherwise where doesn't work either 17:05
jnthn Sure, but as I have it now the binding will fail because the multi-dispatcher says "invoke this one" and on the invocation of what the multi-dispatcher chose, we bind. 17:06
TimToady and then the dispatcher keeps trying
jnthn I'd also been treating only where's on positionals as significant to the multi-dispatcher.
So, hmm. 17:07
I don't know how far changing this will hurt our caching of multis.
It may just make the caching criteria (even) more complex. 17:08
Anyway, that represents a fairly notable change to how I'd understood named parameters participating in the multiple dispatch.
17:09 DanielC left, its is now known as michaelr
jnthn (S12 is very easily readable as I have construed it up until now: Perl 6.0.0 is not required to support multiple dispatch on named parameters, only on positional parameters.) 17:11
TimToady how do you handle ties with exclusive where clauses now? 17:12
moritz_ (though I've wished to lift that restriction a few times already)
TimToady Any $x where { 1} vs Any $x where {2}
this is just another where that happens to require the rest of the sig to bind successfully, in a sense 17:13
jnthn The dispatcher just takes the value and runs the where block.
TimToady you have a set of tied candidates, and you have to run their constraints to see if you only get 1 17:14
moritz_ TimToady: so you mean it should be able to act as tie-breaker?
jnthn where does act as a tie-breaker today.
TimToady yes, as long as only one sig matches correctly, we can do it that way
jnthn rakudo: multi m($a where 1) { say 1 }; multi m($a where 2) { say 2 }; m(1); m(2); 17:15
p6eval rakudo 1831bd: OUTPUT«1␤2␤»
TimToady rakudo: multi m(1) { say 1 }; multi m(2) { say 2 }; m(1); m(2);
p6eval rakudo 1831bd: OUTPUT«Malformed routine definition at line 2, near "m(1) { say"␤in Main (src/gen_setting.pm:3257)␤»
jnthn Rakudo doesn't support that sugar yet.
TimToady std: multi m(1) { say 1 }; multi m(2) { say 2 }; m(1); m(2);
just checking 17:16
p6eval std 27307: OUTPUT«ok 00:03 38m␤»
jnthn rakudo: multi m($a, :x) { }; multi m($a, :y) { }; m($a, :x<1>);
p6eval rakudo 1831bd: OUTPUT«Unable to parse multisig; couldn't find final ')' at line 2, near ":x) { }; m"␤in Main (src/gen_setting.pm:3257)␤» 17:17
TimToady the trick would be to see if the candidate *would* bind without actually calling it
jnthn huh?
TimToady need a variable?
jnthn std: multi m($a, :x) { }; multi m($a, :y) { }; m($a, :x<1>);
p6eval std 27307: OUTPUT«##### PARSE FAILED #####␤Unable to parse multisig; couldn't find final ')' at /tmp/AqudHIp3Py line 1:␤------> multi m($a, :x) { }; multi m($a, :y) { }; m($a, :x<1␤ expecting signature␤FAILED 00:02 37m␤»
TimToady a formal param 17:18
jnthn oh!
TimToady std: multi m($a, :x($)) { }; multi m($a, :y($)) { }; m($a, :x<1>);
jnthn rakudo: multi m($a, :$x) { }; multi m($a, :$y) { }; m(1, :x<1>);
p6eval std 27307: OUTPUT«Potential difficulties:␤ Variable $a is not predeclared at /tmp/Oeic4cNKak line 1:␤------> :x($)) { }; multi m($a, :y($)) { }; m($a, :x<1>);␤ok 00:03 40m␤» 17:19
rakudo 1831bd: OUTPUT«Ambiguous dispatch to multi 'm'. Ambiguous candidates had signatures:␤:(Any $a, Any $x?)␤:(Any $a, Any $y?)␤in Main (/tmp/FesaQR0N9C:2)␤»
17:19 hercynium left
TimToady std: multi m($a, :x($)) { }; multi m($a, :y($)) { }; m(42, :x<1>); 17:19
jnthn So in this case, should the multi-dispatcher have cared about the named parameters and managed to dis-ambiguate based upon them?
p6eval std 27307: OUTPUT«ok 00:03 39m␤»
jnthn (In 6.0.0, that is.) 17:20
If so, then we should be able to use a named param in the traits handling.
But then, what happens to 17:21
class Foo is Bar { }
Bar can't become a named parameter in this case, surely?
17:21 icwiener left
jnthn As in, the key of the pair that becomes the named parameter... 17:21
TimToady that's more like Foo.add_isa(Bar)
jnthn Erm
TimToady as I said, we can distinguish Foo as a type at compile time 17:22
jnthn That's what trait_mod:<is>(...whatever here...) would call in its body though
Ah, so we would just not construct a pair at all in this case?
TimToady is Foo doesn't have to call trait_mod:<is> necessarily
Moose actually distinguishes is from isa 17:23
jnthn It probably will need to call trait_mod:<is> unless the optimizer can decide not do though.
TimToady we're just overloading based on the fact that all types are predeclared
the moment the parser looks up Foo it knows
jnthn Because we don't know nobody introduced a trait_mod:<is>($cont, Foo $x) { } that is more specific. 17:24
TimToady it could turn it into a completely different AST node
it might also be workable thorugh trait_mod:<is>, not saying we have to hardwire it
jnthn OK, but basically...
TimToady but a type could come in as itself, and not pair, yes 17:25
jnthn class Foo is Bar { } # trait_mod:<is>($foo_metaclass, Bar)
class Foo is rw { } # trait_mod:<is>($foo_metaclass, :rw)
Where Bar is a pre-declared type, and rw is not. 17:26
TimToady or could require the sig to say Pair where {.key eq 'rw'}, but then we'd have trouble switching to named later
jnthn Aye.
It'd be a slight pain to re-work the multi-dispatcher, but there's already some changes needed at some level anyway. 17:27
TimToady and I'd rather have the nameds show up at least as a kind of run-time constraint, since STD uses that already :)
jnthn I think I can make it fly without blowing away the ability to keep on caching simple fully-positional calls.
like infix:<+>($a, $b) 17:28
Which need to stay fast.
TimToady as I said, the only trick will be to determine that it binds without calling, unless we relax the tie-breaking semantics to first match rather than only match
jnthn Well, my caching condition has been "can we make a purely nominal type-based decision" 17:29
That is, not dependent on where clauses which need a runtime check.
TimToady this is all in the subsequent tiebreaking for now
jnthn So another question related to this
TimToady but I've always thought the candidate list was somehow weeded down to only those sigs that *could* match 17:30
jnthn multi m(Int $x where 1) { }; multi m($x) { }; m(2); # what gets called
In rakudo now
rakudo: multi m(Int $x where 1) { }; multi m($x) { }; m(2);
p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'm'␤in Main (/tmp/aRMVWtzF7m:2)␤»
jnthn Because we say "ah, we have a candidate"
TimToady the presence of a constraint is narrower than the absence 17:31
jnthn And then use the where's to tie-break.
TimToady yeah
jnthn OK, but the issue here is that we took a candidate based on the nominal type match.
And then went to apply the where check afterwards to narrow down what the type based search found us.
And then our one narrowest candidate has been eliminated.
TimToady Type+constrained is nominal to my way of thinking 17:32
jnthn Did you see it more as, we'd match there where's "in line"?
TimToady but not the particular constraint
only the fact that it is constrained
jnthn s/there/the/
TimToady so constrained can never tie with unconstrained
jnthn And if the where's left us with nothing, continue looking for wider candidates that could match, and in this case pick the second one?
Oh, that doesn't happen now. 17:33
TimToady and if the set of tied candidates is all constrained, we can tiebreak on success somehow
jnthn Note
rakudo: multi m(Int $x where 1) { }; multi m(Int $x) { }; m(2);
p6eval rakudo 1831bd: ( no output )
jnthn That isn't ambiguous.
TimToady yes, if none of the constraints match, fallback to unconstrained candidate
jnthn OK, even if it's less narrow.
OK. 17:34
That will want a little re-working too then.
TimToady so basically named params are a constraint on ¢remainder
jnthn I had pondered implementing this using continuations.
That is, we invoke the thing, it binds, and then returns with a continuation, and then we invoke the continuation on the winner. 17:35
TimToady ¢rest where { "rw" ~~ %¢rest } or some such
jnthn Thus how we can manage the binding without running the body of the thing.
TimToady but I'm inclined to think that we can assume a call ordering and just let the first
one succeed that succeeds 17:36
er...
so forget what I said about ¢rest
there can be other constraints there too that prevent binding 17:37
jnthn good, because I didn't really follow it anyway :-)
17:37 mxxm joined
jnthn So anyway, to conclude: 17:37
TimToady but if we have constrained ties, we call them in some order, and just assume (for now) that there's only one likely candidate
we can maybe sort the order somehow if we think of something rational
pugs_svn r27308 | kyle++ | [t/spec] Test for RT #67058
17:38 mxxm left
jnthn multi m(Int $x where 1) { }; multi m($x) { }; m(2); # should not be ambiguous because we call back to the wider, but unconstrained andidate 17:38
*candidate
TimToady correct
jnthn And
multi m($a, :$x) { }; multi m($a, :$y) { }; m(1) # is ambiguous 17:39
multi m($a, :$x) { }; multi m($a, :$y) { }; m(1, :x) # is not, calls the first
multi m($a, :$x) { }; multi m($a, :$y) { }; m(1, :y) # is not, calls the second
TimToady correct
jnthn multi m($a, Int :$x) { }; multi m($a, Str :$x) { }; m(1, :x(1)) # ambiguous
or not?
oh, bad example 17:40
multi m($a, Int :$x) { }; multi m($a, Num :$x) { }; m(1, :x(1)) # ambiguous
That's the one I meant to type.
TimToady if we assume the wrong binding fails, it's okay
but it's not nominal
jnthn Right, but in that latest one I wrote, binding wins for both of them.
TimToady right, so maybe it's time to just say it tries them in textual order :)
jnthn But named parameters don't participate in the sort order, so that last one would be ambiguous.
Let's not! :-P 17:41
Well, it's not about the order we try them anyway, when they are tied candidates.
It's that we can get ourselves down to only one that binds.
TimToady but I think I'd rather just assume that, rather than having to test them all 17:42
(for now, anyway)
and order of declaration is certainly what a Haskell programmer would expect :)
jnthn I really don't like that idea.
TimToady why not?
jnthn If your multis are coming from various modules, for example.
TimToady (just for tiebreaking order)
jnthn I'd rather ambiguity is flagged up. 17:43
TimToady you define "use" to come either before or after
jnthn And what about the things that you use then use?
TimToady tiebreakers are inherently ambiguous and "switchy"
I have a similar rule for LTM ties already
jnthn OK but IIUC what you're saying is: 17:44
multi foo(Int $x) { }; multi foo(Int $x) { }; foo(1)
That would not be ambiguous any more.
TimToady I think the abiguity hoisting is only useful for the nominal case
jnthn We'd just call the first one.
pugs_svn r27309 | kyle++ | [t/spec] Test for RT #67040
jnthn Oh, you mean what you're saying only applies to where clauses and named parameters being bindable? 17:45
TimToady no, that's ambiguous without constraints
since purely nominal, can be flagged as error
jnthn And we complain about ambiguity in examples where there is one detectable from the "nominal type"?
OK.
That bothers me a whole lot less than what I thought you were first meaning.
OK, so looks like Rakudo's multi-dispatcher needs some attention. 17:46
KyleHa Is it legal to say 'sub foo { state $x //= 42; ... }' to mean the same thing as 'sub foo { state $x = 42; ... }' ?
TimToady this feels like the right way forward, especially if we consider values as params to be constraints
jnthn Why would you? But it should probably work the same.
TimToady: Yes. 17:47
TimToady: Did you settle on what
TimToady that is, subsets are a base nominal type plus constraint
jnthn multi foo(1) { }; multi foo(2) { }; mean?
Are they equivalent to
TimToady sub foo (Odd) is really Int where Odd
KyleHa jnthn: It doesn't work the same, so it needs to be either fixed or declared illegal.
jnthn multi foo(Int $x where 1) { }; multi foo(Int $x where 2) { }; 17:48
or
multi foo(Any $x where 1) { }; multi foo(Any $x where 2) { };
17:48 mizioumt1 left
jnthn (sub foo (Odd) is really Int where Odd) - yes, completely agree, that's exactly what we do in Rakudo. 17:48
KyleHa: It doesn't, but that's a Rakudo bug.
TimToady I think anyone would think 1 is Int
KyleHa jnthn: OK, thanks.
jnthn KyleHa: Almost certain that one has come up before and is ticketed. Just needs a fix. :-) 17:49
TimToady: So we do .WHAT on the value and use what it hands back and the nominal type?
TimToady oh crap, I forgot to go to work
jnthn ...oops.
TimToady have a meeting in 10 minutes, and takes 30 to hike there...
commuting & # later 17:50
KyleHa Yes, I just wrote tests for the ticket, and another bug I found in the process, and I wanted to make sure I didn't put it in the spec when it's just some fanciful blah blah blah.
17:50 ruoso joined
jnthn It's certainly a rakudobug. 17:50
KyleHa How are the contents of t/spectest.data decided? 17:51
17:51 japhb left
jnthn What will Rakudo pass all or some of. 17:51
e.g., no use running tests for features we don't implement at all yet. 17:52
ruoso daniel.ruoso.com/categoria/perl/perl6-fisl10 - the slides for the talk I gave saturday at FISL
KyleHa jnthn: So a file that's all TODO is not there.
jnthn Right. 17:54
KyleHa Thanks.
payload nice slides, ruoso++ 17:55
jnthn ruoso: Nice slides! :-) 17:57
ruoso the audience was much more receptive than I expected 17:59
I saw mostly a "wow" face
17:59 dkz joined 18:03 Molaf left 18:04 Molaf joined 18:05 mizioumt joined 18:07 dkz left 18:12 lichtkind left 18:16 lichtkind joined
mvuets ruoso, very interesting slides. 18:21
FCO ruoso, that was a very good talk! 18:44
ruoso thanks all!
18:50 justatheory left 18:54 japhb joined
KyleHa rakudo: say [+] 1, 2, 3, 4, 5; 18:56
p6eval rakudo 1831bd: OUTPUT«15␤»
payload rakudo: my $a = 0 but True; say ?$a 18:58
p6eval rakudo 1831bd: OUTPUT«The but operator can only be used with a role or enum value on the right hand side␤in Main (/tmp/qMexwJCIu9:2)␤»
payload :(
TimToady rakudo: say [+] 1,2...{$_ + 1 if $_ < 5}
p6eval rakudo 1831bd: OUTPUT«15␤»
payload oh cool. i need to pull a new rakudo version for this feature ^^ 19:00
amoc now looking forward to be implemented laziness yay yay 19:02
payload :-/ github refuses connection, wtf 19:03
amoc => looking forward to implementing the laziness yay yay
ruoso rakudo: my @a = 1,1 ... { $^a + $^b if $^a < 30 }; say @a[16];
p6eval rakudo 1831bd: OUTPUT«Use of uninitialized value␤␤»
ruoso what's wrong? 19:04
TimToady didn't generate enough values
try < 300000
ruoso ah...
right...
rakudo: my @a = 1,1 ... { $^a + $^b if $^a < 3000000 }; say @a[16];
p6eval rakudo 1831bd: OUTPUT«1597␤»
payload :D
TimToady I guess you only needed < 3000 :P 19:05
KyleHa I guess you CAN overestimate the fertility of rabbits.
TimToady rabbits is more like 2...{ $^n * 2 if $^n < 300000000000 } 19:07
rakudo: say 1...{$_+1 if $_ < 10}...{$_+10 if $_ < 100}...{$_+100 if $_ < 1000} 19:09
p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'infix:...'␤in Main (/tmp/s08nx0TvDo:2)␤»
amoc std: 1...2...3...4 ; 19:10
p6eval std 27309: OUTPUT«ok 00:02 36m␤»
TimToady rakudo: say ((1...{$_+1 if $_ < 10})...{$_+10 if $_ < 100})...{$_+100 if $_ < 1000}
p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'infix:...'␤in Main (/tmp/sIFlfPBP23:2)␤»
amoc oh,
TimToady so a sig problem, not (just) an associativity problem 19:11
KyleHa ...got a theory about bunnies...
amoc rakudo: say( ( ((1...{$_+1 if $_ < 10})...{$_+10 if $_ < 100}) ) ...{$_+100 if $_ < 1000} );
p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'infix:...'␤in Main (/tmp/MaW3d7w0z7:2)␤»
TimToady rakudo: say WHAT( 1,2...{$_ + 1 if $_ < 5} ) 19:12
p6eval rakudo 1831bd: OUTPUT«Array()␤»
TimToady should probably be List or some such 19:13
ruoso sometimes rakudo does something like that... I never could actually isolate a simple example explaining how it happens
19:15 dil joined, dil left
amoc rakudo: sub foo () { return 1, 2, 3, 4 }; say WHAT( foo() ); 19:15
p6eval rakudo 1831bd: OUTPUT«too many arguments passed (4) - at most 1 params expected␤in sub foo (/tmp/VHyY7gccjr:2)␤called from Main (/tmp/VHyY7gccjr:2)␤»
TimToady agh 19:16
foo() should not flatten its return capture
amoc rakudo: sub foo () { return 1, 2, 3, 4 }; ( foo() ).WHAT.say
p6eval rakudo 1831bd: OUTPUT«too many arguments passed (4) - at most 1 params expected␤in sub foo (/tmp/X78NPDtULU:2)␤called from Main (/tmp/X78NPDtULU:2)␤»
amoc I see
19:16 dil joined
TimToady foo() should not assume |foo() 19:16
rakudo: sub foo () { my @a = 1,2,3,4; return @a }; foo().WHAT.say 19:18
p6eval rakudo 1831bd: OUTPUT«Array()␤»
amoc mm.. 19:20
rakudo: sub foo () { return (1, 2, 3, 4) }; foo().WHAT.say; ({1,2,3}).WHAT.say 19:22
p6eval rakudo 1831bd: OUTPUT«List()␤List()␤»
ruoso TimToady, the problem is that return in rakudo is still not as-spec 19:23
it doesn't yet use a control exception iirc
jnthn It's exception based.
It's just that the throw was, last time I checked, dynamic rather than lexical. 19:24
ruoso ah.. the problem is with the implicit CONTROL block... yes... now I remember
jnthn But there is a separate "rakudo doesn't really do multiple return values properly yet". 19:25
amoc rakudo: say( list(list(list(1...{$_+1 if $_ < 10})...{$_+10 if $_ < 100})) ...{$_+100 if $_ < 1000} ); #may i test once more
p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'infix:...'␤in Main (/tmp/dObt7InkgL:2)␤»
19:26 jevin joined
amoc rakudo: my @a=1,2,3; say @a ... { $_+1 if $_<10 } 19:28
p6eval rakudo 1831bd: OUTPUT«12345678910␤»
ruoso hmm... it seems that the alternative title of my talk has just generated a twitter meme...
19:39 lumi_ joined 19:40 ejs joined 19:44 eMaX left 19:46 nbrown_ joined 19:49 justatheory joined 19:54 justatheory left 19:55 khisanth__ joined, Khisanth left 19:58 khisanth__ is now known as Khisanth 20:03 jferrero joined, dil left 20:04 nbrown left, nbrown_ is now known as nbrown 20:07 mizioumt1 joined
payload something is wrong with the printed tests in feather.perl6.nl/syn/ 20:12
feather.perl6.nl/~azawawi/html/spec...han.t.html
20:16 xinming joined
moritz_ phenny, tell azawawi 22:12 < payload> something is wrong with the printed tests in feather.perl6.nl/syn/ feather.perl6.nl/~azawawi/html/spec...han.t.html 20:22
phenny moritz_: I'll pass that on when azawawi is around.
moritz_ szabgab: any tuits look at the missin line numbers from perlcabal.org/syn/*.html? 20:23
20:24 mvuets left 20:29 xinming_ left 20:35 mizioumt left 20:37 skids left
ruoso rakudo: say [~] [<a b c>] xx 3 20:39
p6eval rakudo 1831bd: OUTPUT«a b ca b ca b c␤»
ruoso rakudo: say [X] [<a b c>] xx 3
p6eval rakudo 1831bd: OUTPUT«Statement not terminated properly at line 2, near "[<a b c>] "␤in Main (src/gen_setting.pm:3257)␤»
ruoso std: say [X] [<a b c>] xx 3
p6eval std 27309: OUTPUT«ok 00:03 38m␤» 20:40
ruoso is that a known bug?
jnthn More nyi than bug I think (lack of support for nested meta-ops) 20:41
TimToady X isn't a meta-op
jnthn Eh, true. 20:42
In that case I guess we could add it to our generation list perhaps.
ruoso should I rakudobug it?
jnthn If you're wanting to use it, feel free.
20:44 masak joined
jnthn (If not, it'll just start working when the way Rakudo parses and does meta-ops is brought inline with std) 20:44
masak ahoyvning!
phenny masak: 15:42Z <mvuets> tell masak I'm thinking about a try to write my own blogging software in Perl 6. Thus want to learn Perl 6 practically and make it as my degree work.
masak mvuets++
ruoso p6eval, come back! 20:46
moritz_ rakudo: say 1
p6eval rakudo 1831bd: OUTPUT«sh: ./perl6: No such file or directory␤»
KyleHa Testing rand() for randomness kinda stinks. 20:51
ruoso is there a twigil for declaring state variables?
20:52 jrtayloriv joined
jnthn no, use the state scope declarator. 20:53
PerlJam ruoso: nope
20:53 ejs left, pmurias joined
pmurias TimToady: mildew is using old viv AST 20:54
payload masak: i currently play with Tags. is there a nice way to say something like following? pastebin.com/d378febc7 20:57
masak payload: not that I know of. though it might be that can be added. 20:58
20:58 justatheory joined
masak payload: you should grovel before Tene++, the chief maintainer of Tags. 20:58
I only patch it when it contains horrible bugs. :)
21:02 breinbaa1 left
Tene What's going on? 21:03
payload Tene: pastebin.com/d378febc7 21:04
21:04 jrtayloriv left
Tene payload: b 'say'; outs 'Hello world!'; 21:04
payload ah ^^
masak Tene++
pmichaud hello, #perl6
Tene hi pm
payload thx, now my blog will be ready in 2 days or so ^^
ruoso later & 21:05
21:05 ruoso left
Tene payload: ping me any time. 21:06
masak payload: I think I speak for many here when I say I'm very interested in your progress. blog posts, github repositories, gists -- all are welcome.
21:07 mizioumt1 left
payload :-[ 21:08
KyleHa rakudo: my @arr[10]; 21:09
p6eval rakudo 1831bd: OUTPUT«Statement not terminated properly at line 2, near "[10];"␤in Main (src/gen_setting.pm:3257)␤»
KyleHa NYI?
21:09 jferrero left
jnthn nyi. 21:11
masak nYi.
jnthn NYi.
moritz_ agrees with masak 21:12
jnthn rakudo: (<N n> X~ <Y y> X~ <I i>).perl.say
moritz_ KyleHa++ # writing tests for tickets
p6eval rakudo 1831bd: OUTPUT«["NYI", "NYi", "NyI", "Nyi", "nYI", "nYi", "nyI", "nyi"]␤»
masak rakudo: ([X~] <N n>, <Y y>, <I i>).perl.say 21:13
p6eval rakudo 1831bd: OUTPUT«Statement not terminated properly at line 2, near "~] <N n>, "␤in Main (src/gen_setting.pm:3257)␤»
masak should that work? 21:14
moritz_ aye
but second-level meta ops are...
jnthn yeah but it's...
moritz_ NYI
jnthn :-)
masak 哈哈
KyleHa moritz_: It'd be nice if RT could track and search which tickets have test coverage and which don't.
I'm just dreaming. 21:15
moritz_ KyleHa: aye. So far we just have comment/reply on the ticket.
but that's nothing a short perl script can't fix ;-)
I use git-svn anyway, and parsing 'git log' is easy 21:16
KyleHa Oh? I should learn about that.
I thought git-svn had some drawback for two-way communication.
moritz_ if we agree on a standard syntax for the commit mesage, then I'll write such a script and run it from time to time 21:17
KyleHa: it has, but not enough to stop me from using it ;-)
KyleHa Heh.
moritz_ the two biggest are 1) poor svn meta data handling 21:18
and 2) git tracks file moves differently than svn
but that's outweighted by having the full history locally, local commits and local branches 21:19
so, is m/test?s\s+(for\s+)?(rt|perl)\s*#\d/i an acceptable format? 21:21
KyleHa Yes. 21:22
I'd swap the ? and the 's'. 21:23
masak :)
moritz_ uhm, yes
KyleHa Might put optional brackets around the "perl #\d" part in case of paste.
moritz_ aye 21:24
masak moritz_++ # implementing people's dreams 21:25
moritz_ masak: so far I only talked about it ;-)
masak oh.
moritz_--, then. :)
moritz_ ;-)
21:30 Whiteknight joined
KyleHa Runs for over two minutes ($samples = 10 * 2 ** 16): @freq_observed[ $cells.rand ]++ for 1 .. $samples; 21:31
moritz_ s/16/8/ # make it faster ;-)
KyleHa Yeah!
21:31 gbacon left
KyleHa I should say it's been running over two minutes...I haven't seen it finish yet. 21:31
21:32 bruce joined 21:33 pmurias left
bruce what's the right way to have a wek ref in perl6? 21:34
moritz_ bruce: since Perl 6 is garbage collected you don't have to care about that.
bruce isn't that precisely the reason I have to care? 21:35
moritz_ no
in Perl 5 you have to care because it's refcounted
KyleHa bruce: Perl 5 uses reference counting, which is a sort of a retarded garbage collector.
bruce I have an object that has a list of other objects that all have references back
moritz_ with mark-and-sweep (or similar techniques) you don't care at all 21:36
jnthn The Rakudo implementation of Perl 6 uses reachability analysis rather than ref-counting.
So circular references aren't a problem.
bruce I'm really enjoying perl6 so far, just a lot to unlearn 21:37
jnthn :-) 21:39
21:41 perl7 joined
bruce Is there a good doc somewhere on when to use package and module instead of just defining a class, role, etc? 21:42
moritz_ basically if you don't need any OO 21:43
and just want to export subroutines
bruce I see
pugs_svn r27310 | kyle++ | [t/spec] Test the distribution of results from rand() 21:44
bruce then there is a subtle difference between package and module that I haven't quite figured out
moritz_ same here ;-)
so far I've never seen a reason to use 'package'
it seems to be for Perl 5 compatiblity, but I'm not sure
jnthn Rakudo day tomorrow, folks. :-) 21:45
21:45 gbacon joined
moritz_ YaY 21:45
bruce \o/ 21:46
21:46 cognominal left 21:47 cognominal joined
masak yay, Rakudo day! 21:48
21:51 skids joined
perl7 this is a begginer question: Will be perl5 cpan modules ready for use from perl6? 21:55
moritz_ at some point yes.
it doesn't work right now, though 21:56
21:56 KyleHa left
perl7 is easy to translate a perl5 module to perl6? 21:57
PerlJam depends on how well you know perl 6 :) 21:58
Tene And on the module.
PerlJam but generally, I'd say yes (modulo those features of perl 6 that are unimplemented)
Tene In general, though, fairly easy.
21:59 athomason joined
perl7 I suposse that perl5-modules on perl6 run over parrot, so it's possible to run perl5 on top of parrot? 22:00
moritz_ not yet.
perl7 is there any project planned to do this task? 22:02
PerlJam perl7: are you volunteering? ;>
22:03 alester left
perl7 not yet... 22:03
Tene perl7: there have been many suggestions over the years, but I don't know anyone currently planning to work on it.
masak perl7: as far as I understand, it was attempted, but that was quite a while ago, and Parrot wasn't very mature by then.
Tene Suggestions from reimplementing Perl 5, to embedding Perl 5, and a few others.
Getting Perl 5 to emit an opcode tree that's translated into parrot ops, iirc... 22:04
masak perl7: at this point, it might actually be doable, but I'd be lying if I said I think it'd be easy. :)
time to go home and try to sleep a bit. 22:05
22:05 masak left
perl7 interesting, do you know what is the strategy to run perl5-code from perl6? 22:05
moritz_ perl7: Tene mentioned a few 22:06
PerlJam perl7: I imagine that as a first approximation perl 6 will just punt to a real perl 5 compiler.
Tene There is currently no strategy. The strategy will likely be whatever is proposed by the first person to work on it.
perl7 this is a serious problem, isn't it? if perl5 strongest point is cpan, and cpan isn't available from perl6... 22:08
moritz_ it is. 22:09
attempts to fix it are welcome 22:10
perl7 or the project is a new cpan6, translating the key modules...
bruce sounds like a more generic problem though, supporting languages that aren't available via parrot 22:12
22:13 ruoso joined
moritz_ implement them im parrot ;-) 22:14
bruce I see that pugs has a somewhat working version with perl5 22:15
perl7 a language without the richness of libraries, has a big problem
moritz_ perl1 didn't have that either 22:16
PerlJam perl7: what makes you think that Perl 6 won't have these things? 22:17
huf to be fair, it doesnt have them now... :)
PerlJam huf: it doesn't have many things now, but that doesn't mean it won't.
huf but that's basically an argument against *any* change
so yeah : 22:18
)
perl7 I'm sure it will, but I'm thinking there is a big work to do in order to translate/create modules in perl6, this means more time to be spent until a powerfull perl6 platform simplify app development 22:19
moritz_ perl7: that's true, but it's also a chance
perl7: many maintainers of mature modules see some things they don't like about their module 22:20
but they can't change it easily, because it would break backwards compatibilty
Perl 6 offers them a natural way to start off a clean slate
gfldex 90% of all written code was found as not being usefull and replaced by the 10% that are still in use
perl7 this is a common problem, how perl6 resolves module versioning? 22:21
gfldex to _know_ that something is usefull is halve the work
and that's what cpan is telling us
in fact it tells us what is not usefull in quite a lot cases :)
bruce so, slightly off topic, does pulling libraries from supported parrot languages (ex: lua) work at the moment 22:22
22:23 jferrero joined
jnthn bruce: See this post from Tene++: blogs.gurulabs.com/stephen/2009/05/...ading.html 22:24
perl7 this is the same idea that .net CLR, isn't it? 22:25
Tene bruce: lua doesn't have support for inter-language libraries yet. If you're interested in using lua for that, I can work on it.
22:25 sri_kraih_ left
Tene It currently works for Perl 6, Ruby, Scheme, Tcl 22:25
bruce lua was just an example
jnthn Tene: Not LOLCODE yet? :-( 22:26
;-)
Tene jnthn: lolcode doesn't have libraries, afaik.
bruce My question was mere curiosity
Tene If you have evidence to the contrary, I'll fix it.
bruce: Yes, it works right now. 22:27
jnthn :-)
22:27 viklund left, perl7 left 22:29 hercynium joined
PerlJam Tene: so ... when will it work for perl5? ;-) 22:30
moritz_ now you're just being evil ;-) 22:31
Tene PerlJam: as soon as we can use Perl 5 on Parrot.
22:31 ruoso left
jnthn It's going to be a lot of work to get the interop good, but I suspect as a first cut: embed Perl 5 interpreter and make it possible to eval('print "hello";', :lang<perl5>). Then work from there. 22:33
PerlJam Well, as soon as we have perl 6, we'll have a nice platform to build a perl 5 compiler that runs on parrot.
22:33 meppl left
PerlJam (of course, we'll have to forego bug-for-bug compatibility) 22:34
moritz_ more importantly, XS compatibility
buubot moritz_: Sorry, no more output
moritz_ wtf? 22:35
22:36 DanielC_ left 22:39 nihiliad left
PerlJam more foo 22:40
buubot PerlJam: Sorry, no more output
jnthn more /etc/passwd
buubot jnthn: Sorry, no more output
jnthn aww
Tene more jnthn
buubot Tene: Sorry, no more output
moritz_ more
buubot moritz_: Sorry, no more output
Tene more more
buubot Tene: Sorry, no more output
moritz_ buubot--
buubot Couldn't match input.
pugs_svn r27311 | lwall++ | [redspans] pass actions as option to parsefile, as specced
Tene morexlsqbq 22:41
22:44 lichtkind left
moritz_ phenny: tell KyleHa I've got a mailing script working, but perl.org rejects my mails due to blacklisting, maybe you want to give it a try: gist.github.com/137857 it needs to be run from within the git-svn clone 22:46
phenny moritz_: I'll pass that on when KyleHa is around.
22:48 kidd_ left 22:51 Limbic_Region joined 23:04 frew_ joined, icwiener_ left 23:05 ssm left 23:08 ssm joined, stepnem joined 23:16 Veejay joined 23:17 Veejay left 23:18 ssm left 23:19 ssm joined 23:28 ssm left 23:31 ssm joined 23:33 jferrero left 23:43 nbrown_ joined
pugs_svn r27312 | lwall++ | [S11] some notes on ambiguous authority specs 23:44
23:49 snarkyboojum joined