Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-11-28

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 benabik joined #perl6
00:03 arlinius joined #perl6
00:13 arlinius joined #perl6
00:35 grondilu rn: class Foo { multi talk { say "hi" } }; Foo.talk;
00:35 p6eval rakudo e6e158: OUTPUT«No such method 'talk' for invocant of type 'Foo'␤  in block  at /tmp/BjoGQmlbNn:1␤␤»
00:35 p6eval ..niecza v22-44-g0247fe5: OUTPUT«Potential difficulties:â�¤  &talk is declared but not used at /tmp/Dqfz8oCBMK line 1:â�¤------> [32mclass Foo { multi talk [33mâ��[31m{ say "hi" } }; Foo.talk;[0mâ�¤â�¤Unhandled exception: Unable to resolve method talk in type Fooâ�¤  at /tmp/Dqfz8oCBMK line 1 (ma…
00:36 grondilu rn: class Foo { multi method talk { say "hi" } }; Foo.talk;
00:36 p6eval niecza v22-44-g0247fe5: OUTPUT«Unhandled exception: Cannot call talk; none of these signatures match:␤    Foo, Any␤  at /tmp/tLZSMqpd43 line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE…
00:36 p6eval ..rakudo e6e158: OUTPUT«hi␤»
00:36 grondilu Shouldn't a routine by a method by default inside a class?
00:37 grondilu Shouldn't a routine *be* a method by default inside a class?
00:38 grondilu (so we don't have to explicitely say "mutli method" or "proto method")
00:38 grondilu (thus saving seven letters)
00:42 diakopter I like the idea
00:48 fgomez joined #perl6
00:51 benabik rn: class Foo { multi method talk { say "hi" } }: Foo.new.talk
00:51 p6eval niecza v22-44-g0247fe5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Illegal use of colon as invocant marker at /tmp/REBoXaJlWs line 1:â�¤------> [32m Foo { multi method talk { say "hi" } }:[33mâ��[31m Foo.new.talk[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.…
00:51 p6eval ..rakudo e6e158: OUTPUT«===SORRY!===␤Confused␤at /tmp/4cWqSAdkrb:1␤»
00:51 benabik rn: class Foo { multi method talk { say "hi" } }; Foo.new.talk
00:51 p6eval niecza v22-44-g0247fe5: OUTPUT«Unhandled exception: Cannot call talk; none of these signatures match:␤    Foo, Any␤  at /tmp/ldSphf1lub line 1 (mainline @ 6) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE…
00:51 p6eval ..rakudo e6e158: OUTPUT«hi␤»
00:52 benabik huh.
00:59 whiteknight joined #perl6
01:13 hypolin joined #perl6
01:42 thou joined #perl6
01:43 thou_ joined #perl6
02:13 gootle joined #perl6
02:45 yamita joined #perl6
03:03 dalek perl6-roast-data: 4ff44cf | coke++ | / (3 files):
03:03 dalek perl6-roast-data: today (automated commit)
03:03 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/4ff44cfbb2
03:06 grondilu_ joined #perl6
03:08 * [Coke] hurls https://github.com/coke/perl6-roa​st-data/commit/4ff44cfbb2#L2R211 for some intrepid rakudo hacker. (invalid free)
03:13 [Coke] rn: my $oldOUT = $*OUT; my $output; $*OUT = class { method print(*@args) {$output ~= @args.join;}}; print "hi there\n"; $*OUT = $oldOUT; print "XX" ~$output;
03:13 p6eval rakudo e6e158: OUTPUT«XXhi there␤»
03:13 p6eval ..niecza v22-44-g0247fe5: OUTPUT«Unhandled exception: Writing to readonly scalar␤  at /tmp/N7zvzvGQIn line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE @ 578) ␤  at /home/p6eval/niecza/li…
03:13 [Coke] sorear: ^^
03:14 [Coke] (need that for the rosettacode tests)
03:14 sorear I think niecza is right
03:15 sorear hmm, could go either way
03:34 grondilu rn: print $*OUT, "testing redirection syntax"
03:35 p6eval niecza v22-44-g0247fe5: OUTPUT«TextWriter()<instance>testing redirection syntax»
03:35 p6eval ..rakudo e6e158: OUTPUT«-testing redirection syntax»
03:35 grondilu rn: print $*OUT "testing redirection syntax"
03:35 p6eval niecza v22-44-g0247fe5: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row at /tmp/LYZn69cZ8q line 1:�------> [32mprint $*OUT [33m�[31m"testing redirection syntax"[0m��Parse failed��»
03:35 p6eval ..rakudo e6e158: OUTPUT«===SORRY!===␤Confused␤at /tmp/2YpqVSRDwC:1␤»
03:41 orafu joined #perl6
03:42 rurban_ joined #perl6
03:47 rindolf joined #perl6
03:47 [Coke] r: 1..4.map(**2)
03:47 p6eval rakudo e6e158: OUTPUT«===SORRY!===␤HyperWhatever (**) is not yet implemented. Sorry. ␤at /tmp/kOiSxqgrg7:1␤»
03:47 [Coke] r: 1..4.map(* * *)
03:47 p6eval rakudo e6e158: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block  at /tmp/9i9glizIab:1␤␤»
03:57 japhb_ joined #perl6
04:00 japhb_ supernovus, FROGGS, etc: Please take a look at https://gist.github.com/4158939 ; it's a design for an S11-compliant, hopefully reasonably efficient layout for module files on disk.  It uses the pure filesystem when it can, falling back to easily-parsed text files for disambiguation.
04:01 japhb_ It also tries hard not to fall into the trap of some other dynamic language module systems of requiring LOTS of FS operations to find a module file to load, or a binary database with all the unhappy that entails.
04:02 diakopter ooo specs
04:03 diakopter er, design
04:03 * diakopter has to click Raw to get the lines to wrap
04:05 rurban_ joined #perl6
04:05 japhb_ Sorry about that, diakopter!
04:07 japhb_ decommute &
04:08 Exodist joined #perl6
04:23 am0c joined #perl6
04:24 am0c joined #perl6
04:36 Psyche^ joined #perl6
04:42 * japhb thought of an extension to that design on the way home that includes full @*INC support, but needs to cogitate on how to best merge it into the existing design
04:44 sorear I hate @*INC
04:44 sorear it has caused niecza nothing but trouble
04:45 japhb sorear, would you mind explaining exactly why?
04:45 sorear allowing precompiled modules which are compared against existing source code to set their own source code paths has created a permanent scar in the space-time continuum in the center of the niecza module loader
04:46 sorear I could reasonably support @*INC iff I removed the entire precompilation system
04:47 tokuhiro_ joined #perl6
04:49 japhb sorry, distracted for a moment ...
04:50 japhb when you say "set their own source code paths", do you mean that the compiled versions are allowed to specify what file they were created from, and this doesn't have to match a simple naming convention conversion?
04:50 sorear japhb: the really hair-falling-out crying-in-a-corner moments come when you have to deal with diamonds
04:51 sorear if a module is "use"d twice with two different @*INC values, does it get compiled twice?
04:51 sorear if not, which @*INC values do you use in it?
04:51 sorear and how does this interact with caching?
04:51 sorear I've spent weeks on this; I think there is literally no answer
04:52 * japhb takes a few moments to respect the difficulty there.
04:52 sorear and TImToady has made vague statements in the past that I have interpreted as "P6 doesn't really need @*INC"
04:52 japhb Hmmm, interesting.
04:52 sorear although roast currently does
04:53 japhb I'm not sure how lack of @*INC interacts with the principle of least surprise.
04:54 sorear it interacts with the principle of "things that make the implementors want to give up and start a nightclub are not good for users"
04:54 japhb .oO( DNA Lounge )
04:56 * japhb wonders if "*spec* the most conservative reasonable behavior" is a compromise that could save it
04:57 diakopter lolz nightclub
04:57 japhb (As in, don't leave decisions about your diamond questions to implementors, make a conservative decision and codify it)
04:57 * japhb needs to find noms now ...
04:57 japhb &
04:58 sorear at this time?
05:31 integral joined #perl6
05:31 integral joined #perl6
05:35 telex joined #perl6
05:42 replore_ joined #perl6
05:44 birdwindupbird joined #perl6
05:45 kaleem joined #perl6
05:47 moritz \o
05:47 Kharec joined #perl6
05:47 sorear o/ moritz
05:48 dalek star: 9fadd7d | isBEKaml++ | tools/build/Makefile.in:
05:48 dalek star: Modified Makefile template to include p6doc in installed modules. Fixes #12
05:48 dalek star: review: https://github.com/rakudo/star/commit/9fadd7d50c
05:53 thou joined #perl6
05:57 anuby joined #perl6
06:11 tokuhiro_ joined #perl6
06:14 dalek rakudo/nom: aa635da | (Tobias Leich)++ | src/ (2 files):
06:14 dalek rakudo/nom: added indirection and typed exception for X::Backslash::UnrecognizedSequence
06:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aa635daaa2
06:14 dalek rakudo/nom: 7bcefdd | (Tobias Leich)++ | src/ (2 files):
06:14 dalek rakudo/nom: typed exception X::Backslash::NonVariableDollar
06:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7bcefdd6bc
06:14 dalek rakudo/nom: beea5df | (Tobias Leich)++ | src/Perl6/Grammar.pm:
06:14 dalek rakudo/nom: there is no self.sorry but self.panic
06:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/beea5dfcd7
06:14 dalek rakudo/nom: bfbb051 | moritz++ | src/ (2 files):
06:14 dalek rakudo/nom: Merge pull request #92 from FROGGS/x_backslash
06:14 dalek rakudo/nom:
06:14 dalek rakudo/nom: typed exceptions: X::Backslash::UnrecognizedSequence, [...]::NonVariableDollar
06:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bfbb05166d
06:17 rindolf joined #perl6
06:18 dalek rakudo/nom: 797af56 | (Amir E. Aharoni)++ | / (2 files):
06:18 dalek rakudo/nom: Signature.ACCEPTS(Signature)
06:18 dalek rakudo/nom:
06:18 dalek rakudo/nom: The method was mostly written by jnthn.
06:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/797af566bf
06:24 GlitchMr joined #perl6
06:31 lue (just some quick thoughts before bed) japhb: what happens in the case of a module's auth being Any? (e.g. use My::Module:auth<Any>;)
06:32 lue About S11, why does it seem that C<require> can use either a module name or a filename, but C<use> can only take a module name?
06:33 moritz because C<use> is evaluated at compile time, and variables are typically only initialized after compile time
06:33 moritz re auth, 'Any' is as good a string as any (sic) other
06:34 moritz if you don't care about authority, you'd either leave it off completely, or do something like :auth(*)
06:35 * lue would much prefer "*.pm" to "Any.pm" (except for the fact that * is a shell wildcard...)
06:37 sorear moritz: auth values must be URIs, in particular they must contain a colon
06:37 sorear :auth<cpan:SOREAR>
06:37 fhelmberger joined #perl6
06:37 SamuraiJack joined #perl6
06:40 lue Lastly before I go, I have to agree with sorear on @*INC. My thought would be something along the lines of C/C++, where you can provide a module name (which is searched for in standard directories) or a string literal. (use A::B; or use "./a/b.pm"; but not use $string;)
06:46 * lue &
07:14 PacoAir joined #perl6
07:25 japhb lue & moritz, re: auth 'Any': sorear++ is correct that an auth must contain a colon according to Spec, and I rely on that.  'Any' is a mnemonic choice for an intentionally invalid value.
07:37 wamba joined #perl6
07:55 domidumont joined #perl6
08:05 yamita joined #perl6
08:11 fhelmberger joined #perl6
08:15 Kharec joined #perl6
08:35 FROGGS joined #perl6
08:44 kresike joined #perl6
08:45 kresike good morning all you happy perl6 people
08:45 FROGGS morning
08:45 moritz \o
08:53 FROGGS moritz: thanks for the merge
08:55 moritz fwiw I've uploaded the star tarball
08:55 moritz just haven't done the announcement yet
08:56 FROGGS any changes since RC0?
08:56 FROGGS the panda thing, right?
09:01 Kharec joined #perl6
09:23 dayangkun joined #perl6
09:25 sqirrel joined #perl6
09:27 cognominal joined #perl6
09:30 erkan joined #perl6
09:30 erkan joined #perl6
09:33 dakkar joined #perl6
09:39 wamba joined #perl6
09:42 am0c_ joined #perl6
09:50 dalek Perlito: aed21d6 | (Flavio S. Glock)++ | / (4 files):
09:50 dalek Perlito: Perlito5 - js2 - caret Var fix
09:50 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/aed21d6535
09:59 daxim joined #perl6
10:02 azawawi joined #perl6
10:02 azawawi hi
10:03 azawawi_ joined #perl6
10:06 azawawi_ http://paste.debian.net/212959/  # memory + cpu performance bottleneck for 1 == any(@stuff) for 10k+
10:10 azawawi_ joined #perl6
10:15 grondilu rn: class Foo { has ($.a, $.b) is rw }; my Foo $x .= new; $x.a = 13; say $x.perl;
10:15 p6eval rakudo 797af5: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/tDfWA5S4P5:1␤␤»
10:15 p6eval ..niecza v22-44-g0247fe5: OUTPUT«Unhandled exception: Unable to resolve method a in type Foo␤  at /tmp/7zzaq9Ntci line 1 (mainline @ 7) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE @ 578) ␤  at /home/p6ev…
10:15 grondilu r: class Foo { has $.a is rw }; my Foo $x .= new; $x.a = 13; say $x.perl;
10:15 p6eval rakudo 797af5: OUTPUT«Foo.new(a => 13)␤»
10:16 grondilu do I have to repeat the 'is rw' ?
10:16 moritz seems like, yes
10:16 jnthn gah, you want *what* to work... :/
10:16 grondilu yes, I want to distribute it
10:16 marloshouse joined #perl6
10:17 grondilu r: class Foo { has ($.a is rw, $.b is rw) }; my Foo $x .= new; $x.a = 13; say $x.perl;
10:17 p6eval rakudo 797af5: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/DDro9vO0W7:1␤␤»
10:17 jnthn That one should probably work
10:17 grondilu n: class Foo { has ($.a is rw, $.b is rw) }; my Foo $x .= new; $x.a = 13; say $x.perl;
10:17 p6eval niecza v22-44-g0247fe5: OUTPUT«Unhandled exception: Unable to resolve method a in type Foo␤  at /tmp/nvjnjG803U line 1 (mainline @ 7) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE @ 578) ␤  at /home/p6ev…
10:17 jnthn But it's...quite horrible.
10:18 jnthn Because the thing is parsed as a signature.
10:19 grondilu but according to specs, 'has ($.a, $.b) is rw' should be ok, right?
10:19 jnthn Maybe
10:19 jnthn It's just horrible to make work.
10:19 jnthn Because STD has us parsing a signature after a declarator
10:19 jnthn We then have to go back and undo the signature nature of it.
10:20 jnthn But only if what follows is not a bind operator in which case we need to emit something different.
10:20 jnthn It's a bit "special" :/
10:21 grondilu well, I guess I can just write 'has $.a is rw; has $.b is rw' for now.
10:21 jnthn Yes, that's better
10:21 jnthn No signature mess
10:27 azawawi_ star: my @stuff = 1..10000; say "Found" if 1 == any(@stuff);
10:27 p6eval star 2012.10: OUTPUT«(timeout)»
10:27 azawawi_ star: my @stuff = 1..1000; say "Found" if 1 == any(@stuff);
10:27 p6eval star 2012.10: OUTPUT«Found␤»
10:29 azawawi_ jnthn: any clue why is rakudo so slow processing any(@stuff) where @stuff = 1..1000
10:32 azawawi_ jnthn: it also consumes a lot of memory (2.5G+)
10:38 azawawi what so wrong with any() performance in rakudo
10:38 * azawawi tries niecza
10:48 wamba joined #perl6
10:50 azawawi http://paste.debian.net/212965/  # Niecza is faster in junction performance than latest rakudo
10:52 azawawi http://paste.debian.net/212966/  # a more accurate comparison 0m8.875s rakudo vs 0m0.963s Niecza
10:53 SamuraiJack_ joined #perl6
11:00 jnthn azawawi: As I've told you before, that the auto-threader is anything but smart.
11:01 jnthn azawawi: It was written way back as a "need something that works" and didn't get optimized yet.
11:02 Kharec joined #perl6
11:02 Kharec joined #perl6
11:05 imarcusthis joined #perl6
11:05 Su-Shee_ joined #perl6
11:09 cognominal joined #perl6
11:22 masak oh hai, #perl6
11:22 mtymula joined #perl6
11:23 mtymula hello
11:24 cognominal joined #perl6
11:25 masak hello, mtymula
11:25 masak n: class Foo { multi method talk { say "hi" } }; Foo.new.talk
11:25 p6eval niecza v22-44-g0247fe5: OUTPUT«Unhandled exception: Cannot call talk; none of these signatures match:␤    Foo, Any␤  at /tmp/Cl9krQ7IMP line 1 (mainline @ 6) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE…
11:25 masak sorear: that looks... wrong. :/
11:25 tadzik Juerd: ping
11:28 masak sorear: [backlogon the bright side, I think you'd
11:28 masak g'ah.
11:28 masak sorear: [backlog] on the bright side, I think you'd make a pretty decent nightclub.
11:31 mtymula r: sub order-beer($type, $pints) { say ($pints == 1 ?? 'A pint' !! "$pints pins") ~ " of $type, please." }; order-beer(type => 'Hogoblin', pints => 1);
11:31 p6eval rakudo 797af5: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤  in sub order-beer at /tmp/QSW8MI5nr7:1␤  in block  at /tmp/QSW8MI5nr7:1␤␤»
11:31 mtymula does named parameters work ??
11:32 mtymula or i am doing something wrong...
11:33 hoelzro :r sub order-beer(:$type, :$pints) { say "$pints $type" } order-beer(:type('Hobgoblin'
11:33 hoelzro :r sub order-beer(:$type, :$pints) { say "$pints $type" } order-beer(:type('Hobgoblin'), :pints(1))
11:33 hoelzro there we go
11:34 hoelzro apparently the eval bot doesn't care for me =(
11:34 mtymula ok, so there shuld be a semicolon before the name of a parameter?
11:34 masak grondilu: consistency is the reason 'multi' doesn't mean 'multi sub' outside of class/role blocks and 'multi method' inside of them.
11:34 hoelzro I believe so
11:34 masak grondilu: I used to want them to, just like you. I no longer do.
11:35 masak grondilu: the thing that convinced me, I think, is that (unlike in Perl 5) a sub in a class (or even in a method) is a completely valid thing, separate from methods.
11:35 mtymula r: sub order-beer($type, $pints) { say ($pints == 1 ?? 'A pint' !! "$pints pins") ~ " of $type, please." }; order-beer(:type => 'Hogoblin', :pints => 1);
11:35 p6eval rakudo 797af5: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤␤  in method Numeric at src/gen/CORE.setting:796␤  in sub infix:<==> at src/gen/CORE.setting:2806␤  in sub order-beer at /tmp/6qy0MJBNsF:1␤  in block  at /tmp/6qy0MJBNsF:1␤␤»
11:35 masak grondilu: so while you in your use case wanted it to mean 'multi method', it's actually quite concievable that someone else would want it to mean 'multi sub'.
11:35 hoelzro mtymula: I think it's just type => 'Hobgoblin'
11:35 hoelzro rather than :type
11:35 masak aye.
11:36 masak :type<Hobgoblin> works too
11:36 masak but :type => 'Hobgoblin' creates a Pair with a Pair as a key.
11:36 masak rn: say (:type => 'Hobgoblin').perl
11:36 p6eval rakudo 797af5, niecza v22-44-g0247fe5: OUTPUT«"type" => Bool::True => "Hobgoblin"␤»
11:36 masak rn: say (:type => 'Hobgoblin').key.perl
11:36 p6eval rakudo 797af5, niecza v22-44-g0247fe5: OUTPUT«"type" => Bool::True␤»
11:37 SmokeMachine joined #perl6
11:37 masak infix:<< => >> is right-associative according to S03. so both Rakudo and Niecza should've put in parens there.
11:38 masak rn: say ('type' => (Bool::True => 'Hobgoblin')).perl
11:38 p6eval rakudo 797af5, niecza v22-44-g0247fe5: OUTPUT«"type" => Bool::True => "Hobgoblin"␤»
11:38 masak otherwise you can't distinguish it from this case.
11:38 masak (which really could be written without parens)
11:39 moritz I wonder if Pair.perl should use :key(value) in general
11:39 moritz because if we change it (key => 'value'), it can't be used as a named argument anymore
11:41 mtymula this: order-beer(:type<Hogoblin>, :pints<1>);
11:41 masak I don't see what you mean. surely people don't use .perl output as named arguments?
11:41 mtymula does not work...
11:41 masak mtymula: oh, and then there's the problem that you're passing named arguments to positional parameters.
11:41 masak and no, that does not work.
11:42 masak (it used to. we lobbied for changing it. I think the resulting spec got rather confusing.)
11:42 jnthn That's OK, I didn't implement the confusing parts :P
11:42 mtymula indeed.... it is confusing...
11:42 mtymula co how do I make it work??
11:42 jnthn r: sub foo($positional) { }; foo(1)
11:43 p6eval rakudo 797af5:  ( no output )
11:43 jnthn r: sub foo(:$named) { }; foo(named => 1)
11:43 p6eval rakudo 797af5:  ( no output )
11:43 masak here's the spec change in question: https://github.com/perl6/specs/commit/9​4d01246e7d286bb2a4df32ba9c2ba733d0aec04
11:43 masak mtymula: just pass 'Hobgoblin', 1
11:43 masak mtymula: if you don't make the parameters named, why are you passing in named arguments?
11:44 jnthn masak: I think mtymula wants to know how to write/use named parameters.
11:44 masak oh.
11:44 masak I also see hoelzro|away proposed a fix in the backlog.
11:44 masak r: sub order-beer(:$type, :$pints) { say "$pints $type" } order-beer(:type('Hobgoblin'), :pints(1))
11:44 p6eval rakudo 797af5: OUTPUT«===SORRY!===␤Confused␤at /tmp/gHjN7xb_Ij:1␤»
11:44 mtymula becouse i want to make a call on a sub that does not care about the order of parameters
11:44 masak r: sub order-beer(:$type, :$pints) { say "$pints $type" }; order-beer(:type('Hobgoblin'), :pints(1))
11:44 p6eval rakudo 797af5: OUTPUT«1 Hobgoblin␤»
11:44 masak mtymula: there you go. hoelzro++
11:45 masak r: sub order-beer(:$type, :$pints) { say "$pints $type" }; order-beer :type<Hobgoblin>, :pints(1)
11:45 p6eval rakudo 797af5: OUTPUT«1 Hobgoblin␤»
11:45 jnthn Yeah but it should be :$pints where $pints > 1. One hobgoblin aint' enough :P
11:45 masak r: sub order-beer(:$type, :$pints where $pints > 1) { say "$pints $type" }; order-beer :type<Hobgoblin>, :pints(1)
11:45 p6eval rakudo 797af5: OUTPUT«Constraint type check failed for parameter '$pints'␤  in sub order-beer at /tmp/AxZAQfHU2q:1␤  in block  at /tmp/AxZAQfHU2q:1␤␤»
11:45 masak r: sub order-beer(:$type, :$pints where $pints > 1) { say "$pints $type" }; order-beer :type<Hobgoblin>, :pints(5)
11:45 p6eval rakudo 797af5: OUTPUT«5 Hobgoblin␤»
11:45 masak jnthn: better? :)
11:45 jnthn yes :)
11:46 * masak gets uneasy when seeing 'where' without a block
11:46 jnthn Blocking on superstition... :P
11:47 jnthn teaching time :)
11:50 bowtie joined #perl6
11:50 masak .u bowtie
11:50 phenny U+22C8 BOWTIE (⋈)
11:50 masak :D
11:51 masak Unicode -- for when you want to look stylish for the party next door.
11:51 bowtie don't for get to self tie :)
11:52 masak I'm sorry, self-tying bowties weren't invented until 2044.
11:53 bowtie lol
11:53 masak (that's twelve whole years after the Singularity)
11:53 mtymula89 joined #perl6
11:55 hoelzro I did?
11:57 masak yes, right at http://irclog.perlgeek.de/​perl6/2012-11-28#i_6192060
11:58 masak actually, https://github.com/perl6/specs/commit/9​4d01246e7d286bb2a4df32ba9c2ba733d0aec04 is looking quite sane now that I'm reading it.
11:58 masak TimToady++
11:59 masak jnthn: if I put in a new red cell in the compiler features table, would you start thinking about implementing it in Rakudo? :P
11:59 hoelzro huh.
11:59 hoelzro oh, yeah, that
11:59 hoelzro EBADCONTEXT
12:01 masak as the one implementing macros in Rakudo, I can tell you in no uncertain terms that context is everything.
12:06 hoelzro haha
12:22 mtk joined #perl6
12:35 tokuhiro_ joined #perl6
12:55 grondilu I had a weird error trying to compile with --target=pir
12:55 grondilu ===SORRY!===
12:55 grondilu Serialization Error: Unimplemented object type 'QRPA' passed to write_ref
12:57 moritz grondilu: which rakudo version is that?
12:58 grondilu This is perl6 version 2012.10-153-gbf472b0 built on parrot 4.10.0 revision RELEASE_4_10_0
13:02 FROGGS 4.10, wow
13:05 grondilu yeah, I like to live on the edge :)
13:05 * grondilu runs debian sid
13:06 grondilu that's possibly also why I like Perl6 so much:  I can see it's the future.
13:07 FROGGS grondilu: well, I'm running ubuntu ;o)
13:07 FROGGS ya, it is
13:07 FROGGS it's sad sometimes hacking Perl 5 at work... could be so much nicer
13:23 benabik joined #perl6
13:23 masak I often enjoy hacking Perl 5 at work. I realize some things could be better, but Perl 5 is still preferable to, say, Java, or PHP.
13:25 jnthn grondilu: Could you possibly golf it? But I may have a guess...file it either way.
13:26 jnthn After Saturday I actually get to haz tuits again :)
13:27 isBEKaml joined #perl6
13:27 isBEKaml OHHAI, #perl6!
13:27 phenny isBEKaml: 27 Nov 13:45Z <jnthn> tell isBEKaml once December comes, $dayjob gets much less intense and I expect to get some initial JVM things pushed, and will probably have LHF tasks for interested hackers. ;-)
13:29 isBEKaml jnthn: Looking forward to it! :)
13:48 dayangkun joined #perl6
13:51 Pleiades` joined #perl6
13:58 benabik_ joined #perl6
13:59 atrodo joined #perl6
14:08 Pleiades` joined #perl6
14:20 bluescreen10 joined #perl6
14:23 FROGGS masak: the only language that I enjoy the same to Perl 5 is actually C, the others you mentioned cant compete to it
14:23 FROGGS and I would use Perl 6 if it would be a bit faster and if there were the modules I need :/
14:24 tadzik Go is awesome
14:24 [Coke] what modules are you missing?
14:24 masak I can see the attraction to C, yes. it's not a niche I end up writing a lot in, but when I do, I definitely come off with a respect for C.
14:24 masak tadzik: what makes Go a nice alternative to C, in your opinion?
14:24 moritz more importantly, what do you use Go for?
14:25 moritz I've wanted to learn Go for a while, but so far I haven't had a project that was well suitable for Go which I could have used for learning
14:25 d_fallen_god joined #perl6
14:26 d_fallen_god ello?
14:26 moritz EHLO
14:26 tadzik masak: I enjoy it more than C
14:26 d_fallen_god can I ask
14:26 d_fallen_god ?
14:26 FROGGS [Coke]: SOAP::Lite, DateTime::SpanSet, Net::EMI, PDF::Create, to mention a few
14:26 PerlJam d_fallen_god: 42
14:27 d_fallen_god huh?
14:27 daxim go ahead and ask
14:27 d_fallen_god I want to ask about ilbot
14:27 moritz d_fallen_god: try #ilbot
14:27 d_fallen_god how to set it up
14:27 d_fallen_god #ilbot
14:27 brrt joined #perl6
14:27 d_fallen_god thanks
14:27 moritz you're welcome
14:28 d_fallen_god left #perl6
14:28 * moritz wonders where people still find references to #perl6 in the context of ilbot
14:28 masak this wasn't a person, though, it was a fallen god.
14:28 tadzik moritz: I don't use it for nothing serious, when I'm writing compilers for fun for example I prefer Go to C
14:29 * masak .oO( "don't ... nothing" -- you must be from Poland ) :P
14:29 tadzik haha
14:29 masak tadzik: have you tried writing a compiler in Haskell?
14:30 masak I hear that's a really nice experience, too.
14:30 tadzik nope, I don't know haskell at all
14:30 tadzik I used to do that in C, now I do that in Go
14:33 brrt i like go a lot too
14:33 brrt nice, decoupled design with interfaces
14:33 [Coke] (haskell) hey. if you're going to do that, we have one that could use some love
14:34 brrt proper runtime type information, garbage collection
14:34 brrt little syntactic niceties
14:34 tadzik it feels like a "better C"
14:34 masak that's the feeling I've gotten from it, too.
14:35 brrt it is much much bigger than C, though
14:35 grondilu ;;blocks
14:35 tadzik well, the standard library is bigger
14:35 brrt the language is bigger, too
14:35 tadzik the language itself? Slightly
14:35 brrt maybe i'm overestimating the smallness of C
14:36 brrt but go comes with defer, panic, recover; goroutines, closures, interfaces
14:37 brrt slices, obviously, too
14:41 moritz panic and recover? is that, like, exceptions?
14:41 brrt somewhat
14:42 brrt panic() is like throw
14:42 brrt recover() is like catch
14:42 tadzik a bit
14:42 brrt but recover() only works inside deferred functions
14:42 tadzik exceptions are generally discouraged
14:42 brrt which is nice
14:42 brrt imho
14:43 tadzik it's advised to return errors, which is easy for you can return multiple values
14:43 tadzik yeah, I like the idea too
14:43 moritz it just forces you to handle them on every level
14:43 brrt in theory, exceptions are 'better', because you can 'bubble' errors to the levels that are able d
14:43 brrt to deal with them
14:43 brrt in practice
14:44 brrt that fails
14:44 tadzik not on every level. On one level :)
14:44 tadzik you know where they may pop out
14:44 grondilu ;;blocks
14:44 tadzik what is more, Go checks if you actually handle them
14:44 tadzik unless you ignore all return values
14:45 cognominal joined #perl6
14:45 tadzik so while foo, err := bar(); is ok, foo := bar() is not
14:45 tadzik you can explicitely ignore them with foo, _ := bar() though
14:45 masak grondilu: why do you keep saying ';;blocks'?
14:45 masak tadzik: ooh, I hadn't realized that. that's kinda nice.
14:45 benabik_ joined #perl6
14:46 tadzik yeah. Either you don't care about the result, or you _have_ to handle them
14:46 tadzik (them errors)
14:46 benabik joined #perl6
14:46 grondilu masak: sorry, wrong channel
14:47 brrt the effect is also that most functions return an error parameter
14:47 brrt which could be constructed as manually 'bubbling' the error
14:47 tadzik well, all functions that can fail
14:48 masak grondilu: now I'm just so curious which channel that would be a sensible thing to say :P
14:48 masak #lisp? :P
14:48 grondilu masak: not programming
14:48 masak surely programming. it has semicolons and blocks in it.
14:48 grondilu masak: bitcoin related
14:48 masak oh!
14:49 masak well, carry on then. keep those bitcoins rolling.
14:49 brrt i'm actually wondering why i like the error return thing so much
14:50 tadzik because you don't like exceptions? :)
14:50 stopbit joined #perl6
14:50 brrt possibly, but - in theory - exceptions should lead to less code
14:51 cognominal Hi. I think there was an infrastructure in nqp to create compilers from scratch. Has it disappeared?
14:51 brrt in go, if i have foo, e := bar(); if e != nil { return nil, e }; - that is just a 'rethrow' in a way
14:52 tadzik so try { foo = bar(); catch { $_.rethrow } }
14:52 brrt pretty much all your code is going to look like that
14:52 tadzik not too different
14:52 brrt no, indeed
14:52 brrt but rethrowing is a bit senseless in many cases
14:52 tadzik yup
14:52 masak the design problem is making people care about handling about exceptions without being as much of a nuisance about it as Java is.
14:52 brrt again, in theory, i'd be better off if the error that i cannot handle fails to my superior
14:53 masak seems Go struck a nice balance there.
14:53 moritz the point about exceptions is that the exception is rethrown automatically
14:53 brrt i totally agree that it feels nice
14:53 tadzik people treat exceptions like a control flow mechanism
14:53 brrt i just can't comprehend quite why
14:53 tadzik I know a fellow pythoner who claims that they are one
14:53 moritz well, they certainly are
14:53 tadzik "but they're lightweight! Perfect for control flow"
14:53 brrt :-D
14:54 brrt but in seriousness, p6 works with 'control exceptions' too, right?
14:54 tadzik it's a programming pattern, not a language design decison, imho
14:54 moritz yes
14:54 brrt they are dynamically scoped control structures
14:54 brrt the horror of the programmer who has to implement those
14:55 brrt tadzik, in python you actually stop iteration by throwing an exception
14:55 dalek roast: 8d88d57 | (Tobias Leich)++ | S32-exceptions/misc.t:
14:55 dalek roast: test for "$" X::Backslash::NonVariableDollar
14:55 dalek roast:
14:55 dalek roast: Error message: Non-variable $ must be backslashed
14:55 dalek roast: review: https://github.com/perl6/roast/commit/8d88d5706d
14:55 tadzik really?
14:55 brrt it is beyond me why, but yes
14:55 brrt StopException afaik
14:55 tadzik I almost wrote my compilers assignment in it
14:56 tadzik now that I have the parser (mostly) read the assigner said "nono, I changed my mind, write it in C, not Python"
14:56 brrt why?
14:57 tadzik because big files and performance
14:57 tadzik don't even ask me :)
14:57 moritz I think python diectionaries also throw an exception if you look up a key that isn't there
14:57 tadzik awesome
14:57 brrt moritz, they do
14:57 brrt its called a KeyError
14:57 tadzik it's like those java JSON parsers,which throw exception on invalid JSON, but have no isValidJSON method
14:58 dalek roast: 98bd346 | (Tobias Leich)++ | S32-exceptions/misc.t:
14:58 dalek roast: test for "\u" X::Backslash::UnrecognizedSequence
14:58 dalek roast:
14:58 dalek roast: Error message: Unrecognized backslash sequence: '\u'
14:58 dalek roast: review: https://github.com/perl6/roast/commit/98bd3469d0
14:58 tadzik Yoda would be enraged
14:58 brrt adding some insult to injury, catch is called except
14:58 brrt and you HAVE TO TABULATE THAT STUFF
14:59 tadzik hm
14:59 brrt so either you do: if 'foo' in bar: yadayada()
14:59 tadzik it seems that JSON::Tiny does the same
14:59 brrt or: try: yadayada(foo['bar']): except KeyError: something()
14:59 * moritz thinks it's quite sane
15:00 [Coke] (exceptions are flow control) ... of course they are, says tcl.
15:00 moritz I mean, an isValidJSON routine would have to do the same parsing as the decoder
15:00 tadzik well, maybe a Failure would be better here?
15:00 brrt a Failure object would be nicer
15:00 moritz it's just   try from-json($str); not $!
15:00 tadzik hehe
15:00 brrt tadzik++ for being first
15:01 moritz once we have sink context, I'll change it to Failure
15:01 tadzik cool
15:01 brrt does perl6 have multiple return arguments, and if so, how do they differ from returning an array?
15:01 tadzik Failure feels a bit Go-ish
15:02 skids joined #perl6
15:02 tadzik like "it's alright if you don't care about the result
15:02 tadzik "
15:02 tadzik it may happen to be a bit of an action-at-a-distance though
15:03 brrt nm, i have my answer
15:03 masak you can also set Python tables to return a default instead of throwing an exception.
15:04 brrt masak, really? how?
15:04 * brrt would like that feature
15:04 masak I don't know offhand.
15:08 gaussblurinc joined #perl6
15:09 masak ah, here. see the entry d[key] under http://docs.python.org/2/l​ibrary/stdtypes.html#dict
15:09 kaare_ joined #perl6
15:11 moritz today I learned an evil way to determine the string length of $_ in perl 5, which is one character shorter than lenght: y///c
15:11 moritz *length
15:12 brrt how, does that work?
15:13 moritz y is an alias for tr
15:13 moritz so it's the same as tr///c
15:13 rindolf joined #perl6
15:13 moritz and /c complements the search list
15:13 moritz so it searches for any character
15:13 moritz and since the replacement is empty, does nothing
15:13 moritz and counts the number of finds
15:13 tokuhiro_ joined #perl6
15:13 brrt nice
15:14 arlinius joined #perl6
15:14 bluescreen10 joined #perl6
15:15 [Coke] moritz++
15:15 masak moritz: not to mention how much readability is improved. ;) "length" is so opaque and divorced from the task at hand -- "y///c" is more or less self-documenting.
15:16 moritz masak: which is why I labeled it "evil" up-front
15:16 [Coke] masak==
15:16 moritz fwiw that trick is attributed to Abigail
15:16 masak Abigail++
15:18 GlitchMr joined #perl6
15:24 isBEKaml joined #perl6
15:24 isBEKaml moritz: thanks for the merge. :)
15:29 moritz isBEKaml: you're welcome
15:29 isBEKaml masak: about y///c, wait until somebody mangles it even further. :P y;;;c or whatever.
15:29 moritz the version I saw first was y===c
15:29 masak heh :)
15:29 isBEKaml yep, I remember reading about in perl hacks.
15:29 masak eval: $_ = "four"; say y...c
15:30 buubot_backup masak: ERROR: syntax error at (eval 20) line 1, near "say y...c"
15:30 masak eval: $_ = "four"; y...c
15:30 buubot_backup masak: 4
15:30 masak :)
15:31 moritz eval: $_ = 'four'; yc
15:31 buubot_backup moritz: 4
15:31 moritz (there are three chr(2) characters in there)
15:31 moritz but it certainly *looks* even shorter :-)
15:32 isBEKaml heh. That's even more awesome. :)
15:33 dalek Perlito: bd4c687 | (Flavio S. Glock)++ | / (5 files):
15:33 dalek Perlito: Perlito5 - operators - "gt", "lt"
15:33 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/bd4c687f51
15:34 isBEKaml I just typed y^w^w^wc  into my cmd prompt and it printed 4. :)
15:34 bluescreen10 joined #perl6
15:34 * [Coke] wonders if anyone else gets linkedin requests from random perl people they've never met.
15:35 moritz [Coke]: I do
15:35 * FROGGS has no linkedin account
15:36 isBEKaml moritz, [Coke]: You guys are famous!
15:36 obra joined #perl6
15:37 [Coke] isBEKaml: O_o
15:37 [Coke] well, maybe moritz, sure.
15:37 obra left #perl6
15:39 masak isBEKaml: I get linkedin requests for random people (perl or no) I've never met.
15:39 masak er, meant for [Coke].
15:40 * moritz is famous in #perl6 and maybe on perlmonks, but not outside
15:40 brrt wear your fame with pride
15:40 FROGGS moritz: hey, I saw your video in the bundestagsausschusssitzung!
15:40 FROGGS 'was about open source, not just perl6
15:40 moritz I hope to become more famous by widening the circle of Perl 6 users :-)
15:41 moritz FROGGS: ... where I was invited by a perlmonks acquaintance :-)
15:41 FROGGS well, I made two maybe-Perl 6 hackers, you just one from what I know ;o)
15:41 rurban_ joined #perl6
15:42 moritz seen pmichaud
15:42 aloha pmichaud was last seen in #parrot 14 hours 15 mins ago joining the channel.
15:43 masak joins don't mean much in light of netsplits.
15:43 masak wonder why aloha assumes they're meaningful.
15:43 hash_table joined #perl6
15:44 am0c joined #perl6
15:44 arnsholt Whoever implemented it didn't think of netsplits, probably
15:45 am0c joined #perl6
15:45 masak an excusable mistake. still, it makes the seen function less useful.
15:48 arnsholt Indeed. Who is responsible for running aloha?
15:48 thou joined #perl6
15:48 moritz bacek was
15:49 kresike bye folks
15:50 * skids ponders sending [Coke] a linkedin request just to be a bastard
15:50 moritz often I don't decline those requests for a while because there are some perl folks I only know by nick name
15:51 moritz though waiting rarely makes it better
15:53 masak if the invitation has the default invitation message (and not e.g. "remember me? we met at X"), I usually decline.
15:54 FROGGS masak: good to know and good that I already met you ;o)
15:55 FROGGS (even if you cant remember)
15:57 masak FROGGS: I can't, but I'm glad you're here on #perl6, and helping with tickets and patches. :)
15:57 masak FROGGS++
16:02 FROGGS well, I wanna benefit from it at some point (right now it is just fun, later I hope I can make better software using it)
16:02 masak aye.
16:03 FROGGS I believe the game that I started using Perl 5 would be just a fifth of lines of code an much more readable
16:03 masak I feel I got my general introduction to programming languages in the past seven-or-so years. Perl 6, and the ideas in Perl 6, are inextricably tied up into that.
16:04 FROGGS well, my knowledge increased when porting the libSDL to Perl 5, can't say that I have learned much about Perl 6 yet
16:05 FROGGS and I learned a bit at $dayjob too of course, calculating fees for our employees can be challenging too
16:07 moritz ah yes, the fun world of business applications
16:07 FROGGS well, this part is fun actually
16:08 moritz (our internal business app is much more fun to hack than OTRS, for example)
16:08 FROGGS what I really dont enjoy is "yet another workflow thing"
16:08 masak business applications can be lots of fun. the domains are often non-trivial.
16:09 brrt i agree again :-)
16:09 brrt that is to say
16:09 brrt you can often get away with an autogenerated CRUD
16:10 brrt but if you want your users to be better by using your software, you have to go a bit farther
16:11 masak this is what DDD is getting at.
16:11 masak focus on the domain, because it's often worth focusing on.
16:11 clkao_ joined #perl6
16:11 * moritz wonders what the domain of his app is
16:11 * brrt too
16:12 moritz probably "run the business of an IT outsourcer and ISP"
16:13 brrt by the way
16:13 brrt is there a 'good' or 'correct' way to store event data in a cqrs design?
16:14 FROGGS moritz: who is he in "his app"?
16:14 moritz FROGGS: me
16:14 FROGGS ahh
16:25 grondilu rn: say do for ^3 { $_ }
16:25 p6eval niecza v22-44-g0247fe5: OUTPUT«Nil␤»
16:25 p6eval ..rakudo 797af5: OUTPUT«0 1 2␤»
16:26 grondilu I kind of expected just "2"
16:26 FROGGS rn: say do { $_ } for ^3
16:26 p6eval rakudo 797af5: OUTPUT«Any()␤Any()␤Any()␤»
16:26 p6eval ..niecza v22-44-g0247fe5: OUTPUT«0␤1␤2␤»
16:26 FROGGS grondilu: say will be done 3 times, no?
16:27 FROGGS rn: say ( do for ^3 { $_ } )
16:27 p6eval niecza v22-44-g0247fe5: OUTPUT«Nil␤»
16:27 p6eval ..rakudo 797af5: OUTPUT«0 1 2␤»
16:27 FROGGS hmmm
16:27 moritz no, say is only done once
16:27 grondilu not in 'say do for'
16:27 moritz but 'for' is really just the same as 'map'
16:27 moritz so it returns the list of return values from the block
16:27 sirrobert joined #perl6
16:28 moritz (what pythonistas call "list comprehension")
16:28 isBEKaml yep, for completes, and yields back to say.
16:28 isBEKaml for comprehensions.
16:28 sirrobert hiya =)
16:28 grondilu And had say been called three times, there would be linefeeds between 0, 1 and 2
16:28 moritz \o sirrobert
16:28 FROGGS sirrobert: hi
16:28 FROGGS grondilu: right
16:29 isBEKaml hello, sirrobert
16:29 grondilu to me, "say do for ^3 {...}" === "say (do for ^3 {...})"
16:29 moritz that's correct
16:29 masak sirrobert! \o/
16:29 sirrobert masak: =)
16:29 grondilu isn't 'do' supposed to return only the last evaluated expression?
16:30 masak what makes you think that?
16:30 moritz grondilu: yes, and the last evaluated expression is the for-loop
16:30 grondilu ok
16:30 masak it's not what 'do' evaluates to that matters, it's what the 'for' loop evaluates to.
16:30 moritz well, if you chain the two, both of them matter :-)
16:30 grondilu well, not ok actually
16:31 masak and it evaluates to the last evaluated expression *in all of its iterations*.
16:31 masak 'do' just makes an expression of a statement or block.
16:31 sirrobert is there any profiler (like NYTProf) available?
16:31 * grondilu is confused
16:31 moritz sirrobert: not quite as fancy
16:31 sirrobert moritz:  I don't need fancy =)
16:31 moritz sirrobert: but  perl6 --profile script.pl 2>profile.log
16:31 moritz exists
16:32 grondilu Well I guess I just should read a bit about the exact semantics of this thiing
16:32 sirrobert moritz: oohh didn't know that.  cool
16:32 moritz and then  kcachegrind profile.log
16:32 moritz r: sub loopy { for ^3 { $_ * $_ } }; say loopy()
16:32 p6eval rakudo 797af5: OUTPUT«0 1 4␤»
16:32 moritz no 'do' involved
16:33 isBEKaml masak: We should do something like remember this said by someone. :)
16:33 moritz subroutines also return the return value from the last statements
16:33 moritz as does any block
16:33 grondilu ok, good to know
16:34 isBEKaml <masak> 'do' just makes an expression of a statement or block.
16:34 moritz that's actually not quite true
16:34 moritz a block already is an expresion
16:35 moritz but  do BLOCK always runs the block (ie makes it an immediate block)
16:35 masak ah; fair enough.
16:35 masak what moritz++ said :)
16:36 * moritz wonders if we should call 'do' the "JIT phaser"
16:36 grondilu that's S04, right?
16:36 moritz grondilu: aye
16:36 * grondilu will read this again
16:37 isBEKaml moritz: well, yeah. We should say that 'do' always evaluates whatever immediately follows it.
16:37 moritz grondilu: IME stuff gets clearer by using it, less by re-reading it (though I don't want to discourage you from reading)
16:38 sirrobert is that different than the behavior of do-while in p5?
16:38 skids yay someone used the word "immediate"  I was worried it was out of fashion.  (that's sooo ASM :-)
16:38 * isBEKaml finds the trackpad on his laptop annoying to the point of interfering with typing. :/
16:38 [Coke] r: do do do do do do do say 3;
16:38 p6eval rakudo 797af5: OUTPUT«3␤»
16:38 [Coke] r: do do do say do do do 3;
16:38 p6eval rakudo 797af5: OUTPUT«3␤»
16:38 [Coke] whee.
16:38 sirrobert skids:  I like the word "immediate"... I've also lately enjoyed using "mediate" similarly...
16:39 isBEKaml skids: Well, English confuses me. :P
16:40 sirrobert isBEKaml:  it was a good use of the word =)
16:40 sirrobert isBEKaml: the relationship between "do" and "block" is not mediated by any other "intermediary" element =)
16:40 isBEKaml sirrobert: Mediate and immediate aren't the same!
16:41 sirrobert isBEKaml: the adjective "mediate", not the verb
16:41 moritz my dictionary only knows it as a verb
16:42 sirrobert isBEKaml:  immediate is the negation of mediate with the prefix "im-" (which was "in-" but the "n" gets assimilated to an "m" when it comes before another "m")
16:42 isBEKaml moritz: I think sirrobert meant immediate to be an adjective. If that's an adjective, it's new to me unless he's talking of intermediary or something like it.
16:42 MayDaniel joined #perl6
16:42 sirrobert isBEKaml: nod.  you said "immediately" which is the adverbial form of the adjective "immediate"
16:43 moritz "immediate" (adject) = without dely
16:43 moritz *delay
16:43 moritz *adjective
16:43 moritz so, "mediate" (adjective) = possibly with delay ?
16:43 isBEKaml sirrobert: I'm not a native speaker. Grammar gives me painful memories. :)
16:43 sirrobert moritz: nod, but "delay" is a metaphor there.  It is really "unseparated", but the common usage is unseparated in time
16:44 skids wictionary has the adjective form as "acting through a mediating agency"
16:44 sirrobert Example-- in philosophy you can refer to "immediate" or "mediate" causes of various effects
16:44 isBEKaml moritz: immediate would also suggest proximity. Nearby things.
16:44 moritz sirrobert: ah, that makes a lot of sense
16:44 sirrobert moritz: =)
16:44 sirrobert isBEKaml:  yeah.  it's a closer relation than "proximal"
16:45 isBEKaml sirrobert: aye.
16:45 shachaf Example++
16:46 atrodo joined #perl6
16:47 isBEKaml #perl6++ I didn't know something as trivial as a word could kick off a whole new conversation on this channel!
16:48 FROGGS well, it's about language...
16:48 FROGGS if TimToady would be here right now...
16:50 wamba joined #perl6
16:53 isBEKaml ... he'd extract missing words out of seemingly correct sentences and take us into a verbalate'
16:53 isBEKaml :P
16:55 sirrobert word play is good play =)
16:56 isBEKaml *nod* *nod*
17:14 SamuraiJack_ joined #perl6
17:28 masak isBEKaml: I used to regard grammar with skepticism. I got a much healthier relation to it when I realized that it fills a role similar to mathematics; it allows us to speak precisely about phenomena that may interest us.
17:29 PerlJam It also allows us to speak imprecisely too.  (Ambiguity is quite important; especially on #perl6 :-)
17:30 isBEKaml masak: so grammar is  design patterns for language? You can tell me that after you've had teachers quoting W & M all day in high school. :)
17:31 masak I don't know what W & M is. some book, I guess.
17:31 tadzik moritz++
17:31 tadzik the y///c trick is awoseme
17:31 isBEKaml masak: Wren & Martin. Grammar reference stuff.
17:31 masak PerlJam: oh, I meant on a meta level. grammar allows us to speak precisely about *language*.
17:32 PerlJam ah.
17:32 PerlJam (what I said still applies ;-)
17:32 masak aye.
17:33 masak one common way to misunderstand grammar is to think that what we were taught at school is all there is to language, and everything else is improper use.
17:33 masak in reality, language is more like a living organism, and we can capture some things precisely, other things not.
17:33 PerlJam oddly, that's the same problem in mathematics too
17:34 isBEKaml masak: exactly my point. Language evolves and should never be allowed to be tied down by grammar lawyers. :)
17:34 PerlJam There's still a pervasive "one right answer" philosophy in much of western education systems, even when it's not true.
17:35 wamba joined #perl6
17:36 masak isBEKaml: it's not so much that we can't describe it exactly. it's more like that's not the point of the exercise.
17:36 masak the point is more to be able to describe what was said/written, and why it was said/written in that way.
17:37 PerlJam masak: communication is still hard no matter the utility of language.  A couple of week ago, I asked my wife a question and her answer was not to the question I asked, but she thought she was answering me.   It took 3 tries to get her to understand that she wasn't answering me and what I was actually asking.  Even though my use of language was precise in this case, it didn't matter.
17:38 isBEKaml the former falls under semantics, while the latter is the realm of grammar. Grammar's just for talking about structure. I see nothing more than that.
17:39 masak PerlJam: sometimes I'm amazed that brains can communicate through sound waves at all.
17:39 PerlJam indeed
17:40 PerlJam isBEKaml: "just"?
17:41 isBEKaml masak: Well, if you're thinking of telepathy, I can think of horrible communication mishaps where one person's visualisation is very much different from another's. ;)
17:43 isBEKaml PerlJam: Well, the teachers I have had were mostly W&M toting maniacs. They'd throw all those confusing buzzword sounding terms like participle, past participle, intransitive, imperfect tense. I was even surprised I made it through at all.
17:43 masak I wasn't thinking of telepathy. just the fact that it seems to me that brains are different enough to essentially be running on unique protocols, and that spoken/written language sometimes seems to fall very short of bridging the gap.
17:44 PerlJam sound waves are just an agreed-upon intermediate representation that compiles to thought patterns via our brains, only brains are kind of lossy compilers.
17:45 isBEKaml masak: I'm even amazed that humans even thought of communication needs at all.
17:45 FROGGS joined #perl6
17:45 PerlJam isBEKaml: *that* was a darwinian thing.
17:45 FROGGS {sitting on couch}++
17:46 isBEKaml PerlJam: Mistaken evolution.
17:47 PerlJam our species plays the hand they are given.
17:47 gfldex i'm trying to build rakudo-star-2012.11-RC1 on cygwin right now
17:47 gfldex 0 [main] parrot 3068 child_info_fork::abort: C:\cygwin\bin\cygicudata48.dll: Loaded to different address: parent(0x910000) != child(0x7B0000)
17:47 gfldex Can't spawn child process
17:47 gfldex current instr.: 'spawnw_cmd' pc 643 (tools/dev/pbc_to_exe.pir:216)
17:48 gfldex if rakudo wants to be commited about supporting cygwin avoiding fork where ever possible would be desireable
17:48 gfldex windows--
17:48 isBEKaml PerlJam: if anybody were to follow our evolution, they'd either be laughing at all this tamasha or slapping their heads in agony.
17:50 isBEKaml gfldex: that looks like an error from parrot build. Can you nopaste the entire thing?
17:50 gfldex i will in a few
17:50 masak "tamasha". wonderful word, and useful.
17:51 masak तमाशा
17:51 masak isBEKaml++
17:51 isBEKaml masak: one of the few words that made it from Indian languages to English. :)
17:52 masak I had never heard it before.
17:52 * PerlJam either
17:53 isBEKaml masak: well, you do now. Here's another: catamaran. (If you want to go hunting down its etymology :P)
17:54 Chillance joined #perl6
17:56 masak I know the word; didn't know it came from Tamil. :)
17:56 masak "tied wood" :)
17:57 isBEKaml yep, kattu-maram. more like "tied tree"
17:58 masak oh, ok.
17:58 masak isBEKaml: what languages do you speak?
17:59 gfldex isBEKaml: https://gist.github.com/4162887
17:59 gfldex rebaseall did not help
18:00 isBEKaml masak: english, tamil and a smattering of hindi.
18:00 masak nice.
18:01 masak from Wikipedia: "Tamil is one of the longest surviving classical languages in the world." -- wow.
18:01 PerlJam heh, I was just reading that as well :)
18:01 masak and Tamil literature has existed for over 2k years.
18:01 masak I wonder how it stacks up agains Chinese.
18:02 isBEKaml gfldex: that's not good. I was able to build RC0 y'day (without ICU, though).
18:02 masak granted, Chinese has a bit of a discontinuity since the classical, written language was replaced by the common, spoken language.
18:03 isBEKaml masak: I've been trying to learn some Chinese just to kill time. It just feels so disjoint at the alphabetic level. :)
18:03 masak isBEKaml: OMG you're the ones with the alphabet where all letters look like cute little kittens! :D
18:04 isBEKaml masak: Oh, come on! That's telugu and kannada. We don't kill kittens, honest!
18:04 masak oh. :)
18:05 masak yes, seems I was thinking of the Telugu script.
18:05 masak isBEKaml: more and more, my brain tends to do short things in Chinese. thinking "我们到了吗?" instead of "have we arrived yet?"
18:06 masak Mandarin has a distinct Forth feel to it.
18:06 isBEKaml masak: more like APL than Forth. :D
18:06 masak yes, that might be a better comparison, actually.
18:06 masak it clearly feels like a composable, functional language.
18:07 isBEKaml masak: so much that I have just given up and started squinting around alphabets to see how they look in pictures. :P
18:08 masak "pictures"? do you mean hanzi?
18:08 isBEKaml masak: for example, the word for "mouth"(kuo) in traditional chinese - I just see an open mouth!
18:09 kaleem joined #perl6
18:09 isBEKaml masak: for man (ren), a torso less body with two legs astride!
18:10 spider-mario joined #perl6
18:10 masak oh, that effect. yeah, definitely.
18:11 isBEKaml masak: I tend to think whoever instituted these words must have either been in a drugged state or were blind.
18:11 masak I'm already at a stage where I hallucinate radicals to the right thing most of the time, and have a hard time understanding how hanzi noobs don't. "what do you mean, not a dog? 犬 is totally a dog."
18:12 masak isBEKaml: also recall that we're seeing the effects of thousands of years of simplification/stilization.
18:12 * PerlJam feels incredibly occidental
18:13 isBEKaml masak: that is why you should have as few letters in alphabet as possible, but no fewer. :P
18:13 masak PerlJam: if you get occidental enough, eventually you'll end up in East Asia :P
18:14 masak isBEKaml: it's not an alphabet :)
18:14 isBEKaml masak: alphabets are composable enough to form new words, but I can't say the same of sounds. They don't seem to follow any definite pattern. :)
18:14 masak Pinyin has an alphabet. hanzi are just a character set.
18:15 masak "logograms". boy, there are so many terms for this.
18:15 isBEKaml Oh, I use neither. I'm just reading off a book.
18:15 isBEKaml PerlJam: Careful there, you'd just be looking far-eastern mysticism.
18:20 isBEKaml gfldex: where did you get RC1 from, btw?
18:21 gfldex wget "http://moritz.faui2k3.org/tmp/​rakudo-star-2012.11-RC1.tar.gz"
18:23 cognominal speaking of language, the entry about emic and etic was anemic (no pun intended), it has been considerably extended these last few days.  http://en.wikipedia.org/wiki/Emic
18:43 rurban_ joined #perl6
18:43 isBEKaml gfldex: I just built R* successfully here.
18:44 isBEKaml gfldex: do you have any space issues?
18:44 gfldex no
18:45 gfldex isBEKaml: if you want to read up about the fork issue: http://cygwin.com/faq-nochunks.html#faq.using.bloda
18:45 gfldex isBEKaml: do you got cygwin in a vm or are you running it on a broadly used windows system?
18:46 isBEKaml gfldex: It's not on a vm. It's on a standalone windows installation.
18:46 rurban_ joined #perl6
18:48 isBEKaml gfldex: you may want to check with rurban on #parrot. He helped me with cygwin issues before and also maintains cygwin builds of parrot.
18:56 isBEKaml anybody seen this error before? Method 'cuid' not found for invocant of class 'NQPMu'
18:56 isBEKaml Happens with p6doc on my machine here.
19:00 rurban_ joined #perl6
19:02 cognominal joined #perl6
19:06 zby_home_ joined #perl6
19:08 telex joined #perl6
19:10 Tene joined #perl6
19:13 rurban_ joined #perl6
19:13 isBEKaml perl6 --doc is broken :(
19:13 moritz seems to be related to lexpads in some way
19:14 dalek Perlito: 5879509 | (Flavio S. Glock)++ | / (7 files):
19:14 dalek Perlito: Perlito5 - parser - fix eval-string signature; caret-var fix; 3 more lex.t tests pass
19:14 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/5879509ec6
19:17 isBEKaml moritz: could it be? command_eval but command_line is what is called from main.nqp.
19:18 moritz Method 'cuid' not found for invocant of class 'NQPMu'
19:18 moritz current instr.: 'add_phaser' pc 19602 (src/gen/perl6-symboltable.pir:7167) (src/Perl6/World.pm:1414)
19:20 * moritz tries a fix
19:22 dalek star: a02870e | moritz++ | tools/star/release-guide.pod:
19:22 dalek star: small update to release guide
19:22 dalek star: review: https://github.com/rakudo/star/commit/a02870e2f2
19:27 dalek Perlito: 0bc2e7a | (Flavio S. Glock)++ | / (5 files):
19:27 dalek Perlito: Perlito5 - parser - fix package autovivification; 3 more lex.t tests pass
19:27 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/0bc2e7a3b0
19:37 dalek rakudo/nom: 110a8e4 | moritz++ | src/Perl6/Actions.pm:
19:37 dalek rakudo/nom: fix --doc option, reported by isBEKaml++
19:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/110a8e49da
19:37 masak moritz++ # fix early, fix often
19:37 isBEKaml moritz++
19:38 masak did the signature of add_phaser change, breaking this code?
19:38 masak ISTR jnthn changing it recently for some other phasers.
19:38 dalek star: a67c183 | moritz++ | tools/star/release-guide.pod:
19:38 dalek star: fix mailing list address
19:38 dalek star: review: https://github.com/rakudo/star/commit/a67c1838f5
19:40 moritz masak: not the signature, only whether the optional argument needs to be present in certain cases
19:46 masak ah.
19:47 masak there's a research paper all on its own: "Caller breakages when callee preconditions change" :)
19:47 jnthn Will it reference the paper "Things that don't have test coverage more likely to get broken"? :)
19:49 masak moritz++ # Star release
19:56 REPLeffect joined #perl6
19:57 noggle joined #perl6
19:59 felher moritz++ # release
20:00 moritz jnthn: we really need a plan for testing stuff which doesn't belong into roast
20:00 moritz non-specced command line options, REPL, precompilation
20:06 masak that is more or less the problem I had with crypt last year. the "interactive" parts were non-testable.
20:06 masak solution: DI.
20:06 moritz DI?
20:07 masak Dependency Injection.
20:07 pmichaud good afternoon, #perl6
20:07 * moritz isn't so sure
20:07 masak pmichaud! \o/ \o/
20:07 moritz \o pmichaud
20:07 masak moritz: or, equivalently but from a FP perspective: make the system under test into a function, and pass the environment as parameters.
20:07 pmichaud can't stay long today... just wanted to note that I'll be able to make the Star .msi release again this month
20:07 pmichaud will do that in the next day or so
20:07 pmichaud moritz++ # star release
20:07 * moritz already has an assault planned on pmichaud
20:08 masak :)
20:08 moritz pmichaud: could please turn github.com/rakudo into an organization?
20:08 moritz pmichaud: this month we couldn't give our release manager a commit bit, and that was annoying
20:08 masak moritz++
20:08 moritz (compiler releaes manager, that is)
20:08 pmichaud could've sent me an email :)
20:09 moritz yes, I guess i could have
20:09 moritz but still, wouldn't hurt to scale, IMHO
20:09 tadzik 2100        moritz | jnthn: we really need a plan for testing stuff which
20:09 tadzik | doesn't belong into roast
20:10 tadzik so, the 'make test' stuff?
20:10 pmichaud currently we still require CLAs for commitbits to the rakudo repo, though.
20:10 moritz tadzik: yes, but the 'make test' stuff has much less infrastructure right now than we need for that stuff
20:10 moritz pmichaud: yes, but iirc we already made temporary exceptions for release managers
20:11 pmichaud moritz: okay, give me a day or two to think about it; I had reasons for not moving it instantly to an organization repo
20:11 moritz pmichaud: ok
20:12 pmichaud but I do still read email :)
20:12 jnthn o/ pmichaud :)
20:12 FROGGS btw, I sent the CLA (via email and mail)
20:13 jnthn moritz: Is --doc not spec, ooc?
20:13 rurban_ joined #perl6
20:13 jnthn moritz: Agree with your point otherwise, though
20:13 moritz jnthn: oh, it is
20:13 tadzik --doc is spec
20:14 pmichaud jnthn: o/
20:16 supernovus joined #perl6
20:18 supernovus Hmm, perlfoundation.org still does not resolve from my location. :(
20:19 kurahaupo joined #perl6
20:19 japhb o/
20:20 FROGGS hi japhb
20:20 japhb Other than comments about not liking @*INC (which wasn't part of the original idea), and a question about use of 'Any', did anyone have any other thoughts on the S11-compliance design I posted last night?
20:21 japhb Hi FROGGS!
20:22 FROGGS japhb: have missed it, but will read now
20:22 japhb FROGGS, ah, OK, thank you.
20:25 japhb phenny, tell azawawi I'll add your any(@array) benchmark to perl6-bench. Any other micro-benchmarks you'd like to see added, or particular performance gotchas you've found?
20:25 phenny japhb: I'll pass that on when azawawi is around.
20:26 japhb As a matter of fact, that's open to everyone:  If you know of a scaling or other performance weakness in one of the Perl compilers, please let me know, and I'll try to add relevant benchmarks to perl6-bench for it.
20:27 dalek roast: 127f694 | moritz++ | / (2 files):
20:27 dalek roast: basic sanity tests for --doc command line option
20:27 dalek roast: review: https://github.com/perl6/roast/commit/127f694a94
20:27 dalek rakudo/nom: 247f875 | moritz++ | t/spectest.data:
20:27 dalek rakudo/nom: run test for --doc command line option
20:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/247f87518a
20:27 supernovus japhb: It looks pretty good to me, with one caveat: we need to decide how to encode the Auth portion into a directory-friendly version. Since Auth is meant to store a URI, it must contain a colon, and may contain slashes as well.
20:28 moritz file:/// exists
20:28 * moritz hasn't read the draft yet
20:28 Chillance joined #perl6
20:30 FROGGS japhb: I like it
20:30 FROGGS currently thinking of circumstances where it can went wrong...
20:30 japhb Are there any filesystems in which : is verboten?  (I know Windows uses the *first* colon as a drive separator when using \ directory separators, but I don't know if that applies to when it parses / syntax, or if it makes all : disallowed.)
20:30 japhb FROGGS, Excellent.
20:31 moritz japhb: I think it does forbid subseqent :s
20:32 moritz (not quite sure though)
20:32 flussence windows tries its hardest to stop you using those funny characters, but IIRC you can force NTFS into POSIX mode in linux
20:32 japhb But in any case, it may be a matter of URL-encoding the auth on filesystems that can't handle it.
20:32 spider-mario_ joined #perl6
20:32 supernovus Say for instance :auth<github:supernovus> or :auth<http://github.com/supernovus/>  If we want to go with dead simple, we could say, encode both : and / to _, collapsing to a single _ character in a row, and stripping trailing _ characters, making the folders for the previous examples 'github_supernovus' and 'http_huri.net'  respectively.
20:32 sirrobert joined #perl6
20:33 sirrobert jnthn: my using the debugger, it doesn't seem to step into method calls as I would expect (it defaults to stepping over them).  Is there some setting I should look at?
20:33 japhb And the slash character is an interesting question ... that does kindof push the URL encoding idea.
20:33 sirrobert (using the R* 2012.11-RC1 debugger)
20:34 FROGGS japhb: <> is forbidden too
20:34 japhb The other idea is to do what supernovus suggests, just accepting that this will increase the number of times you may get collisions and have to consult the state/manifest file.
20:34 leont joined #perl6
20:34 supernovus URL encoding schema doesn't work either, as using % characters is not guaranteed to work.
20:34 japhb What FS breaks %?
20:34 japhb (OOC)
20:34 FROGGS japhb: I would go for \w only file filenames, just to be sure, you dont know if this has to work someday on an android or whatever will be
20:34 japhb >.<
20:35 japhb I Hate FS.
20:35 FROGGS ;o)
20:35 FROGGS there you are
20:35 pmichaud I'll be back again soonish
20:35 pmichaud will post a .msi soonish
20:35 japhb Or rather, I hate the fact that there are FS that disallow anything other than / and NUL.
20:35 supernovus japhb: Honestly, the chances of collisions is there, but not too serious.
20:36 diakopter japhb: disallow?
20:36 supernovus japhb: and if we use your suggestion, in the case of auth collisions, refer to the state file.
20:36 japhb supernovus, true.
20:36 moritz japhb: fwiw the last time we've discussed module file names (back in the pre-nom days when discussing module versioning), we decided to do allow A/B.anythiing.pm for module A::B
20:36 FROGGS japhb: please consider too that the full path should not be longer than 255 chars, or some backup system wont operate on these paths
20:36 japhb diakopter, Meaning, characters not allowed in a directory entry's name portion.
20:36 FROGGS so maybe a full url might be too long
20:37 moritz japhb: and then the compiler is free to maintain a cache with version and auth, or otherwise must read all candidate files that match that pattern
20:37 japhb FROGGS, ooh, interesting point.
20:37 moritz (mostly because it's ugly to map anything to file names, and because we didn't have great ideas back then)
20:37 diakopter japhb: so the directory entry's name portion can contain only / and NUL?
20:37 moritz things you need to consider: module names, auth etc. might be non-ASCII, not all file systems can map it
20:38 FROGGS right you are
20:38 supernovus moritz: Well, we can incorporate that into the scheme, by having say lib/XML/Grammar.github_huri.3.0.0.pm6 for example
20:38 moritz then you need facilities to allow module names that only differ in case, on case insensitive file systems
20:38 japhb diakopter, Ah.  English ambiguity: "Or rather, I hate the fact that there are FS whose disallowed-character set is anything other than the set containing just / and NUL."
20:39 diakopter japhb: oh I see :) boy, I feel dumb
20:39 arlinius joined #perl6
20:40 japhb diakopter, Nope, it's a real ambiguity, your brain just settled on the wrong local maxima of disambiguation probability.
20:40 supernovus which would match a "use XML::Grammar:auth<github:supernovus>:ver(v3.0.0 .. *);" statement.
20:41 supernovus Still need to work out what to do in the cases where a major version is over 10, as the version literal syntax currently breaks (confirmed in both Rakudo and STD).
20:41 japhb supernovus, moritz: I still like doing Module/Name/auth/ver.pm rather than Module/Name_auth_ver.pm, partly because I'm paranoid about filename length, partly because it's cleaner to my eyes, and partly because the directory form has fewer ambiguities.
20:42 japhb supernovus, methinks that is merely a copy-pasted bug lacking sufficient tests.  :-)
20:42 FROGGS hmmm, s/\w+/_/g  might work well if the name is long enough, but I guess it is unlikely that two similar named authors fiddle on the same module
20:43 japhb I assume you mean s:g/\W+/_/   ;-)
20:43 FROGGS ya, whatever :P
20:43 japhb Just teasing.
20:43 FROGGS np, I can stand it
20:44 supernovus japhb: I like your proposal, with the subdirectories instead of filenames.
20:44 spider-mario argh
20:44 spider-mario make: *** [src/stage1/QASTNode.pbc] Segmentation fault (core dumped)
20:44 spider-mario when building nqp
20:45 FROGGS including the authors name and the version in the modulename makes sense for modules where you have many sub-namespaces
20:45 moritz spider-mario: I've had that too on one machine
20:46 moritz spider-mario: i used a newer parrot, which helped
20:46 supernovus I guess within that scheme lib/XML.pm would get installed as lib/XML/github_supernovus/3.0.0.pm6 (or whatever the version specified in A.) the module itself, or B.) the META.info file, happens to be.)
20:46 spider-mario oh, ok
20:46 japhb OK, so do we need to agree on a single filename mapping that fits the least common denominator of every FS we think might be used, or do we declare that the character mapping to the filesystem is platform-dependent, all ambiguities therefrom are resolved by the state/manifest file, and the user is "none the wiser"?
20:46 FROGGS otherwise you will have many dirs that have the authors name
20:46 spider-mario I guess I’ll have to wait for parrot 4.10 to be packaged in my distro, then
20:46 spider-mario it’s currently 4.9
20:47 diakopter I agree that author should come before module name, since it's much more likely for an author to have multiple modules than a module to have multiple authors
20:47 FROGGS japhb: I vote for one mapping for all, not a platform or filesystem depended one
20:47 japhb diakopter, yes, and also because S11 specs that auth must be considered before ver in all cases.
20:47 spider-mario thanks, moritz
20:48 FROGGS like they did on cpan, author comes first, but then it doesnt play that well with Any
20:48 diakopter japhb: no I mean before XML
20:48 supernovus If author comes before module name, then we'll need to use the state file, and won't be able to depend on directory based lookups.
20:48 japhb FROGGS, the advantage to picking (as you did) one mapping for all, is that it is easier for the implementors of the module system to write cross-platform module handling code.
20:49 FROGGS right
20:49 diakopter supernovus: oh
20:49 japhb diakopter, Oh, I see, sorry.  I disagree then, because when you're trying to load a module, you don't want to traverse every auth directory trying to find the module's first part.
20:50 supernovus If I do "use XML" it's really easy to find "lib/XML/Any/Any.pm6" and not have to look in the state file. If the folder is "lib/github_supernovus/XML" instead, then to look it up, we need to look in the map.
20:50 japhb Which I guess supernovus++ beat me to saying.  :-)
20:50 flussence ooh, I just thought of something
20:51 diakopter well, you would still have to traverse authors of XML::*, just there would be much fewer
20:51 FROGGS think of a dist with modules like: ABC, ABC::DEF, ABC::EFG; ABC::EFG::XYZ, whats the style with the least amount of dirs? I guess the lib/ABC/DEF_FROGGS_1.0.0.pm6 structure
20:51 flussence you could have "lib/XML/Any/Any.pm.d/$auth-thingy.pm"
20:51 flussence (lots of linux stuff is doing that pattern these days)
20:51 moritz .oO( just develop a content-addressable file system and force everybody to use it ... )
20:51 japhb FROGGS, the downside to picking one mapping for all, is that as soon as we decide on a mapping that should work everywhere, someone invents a "more broken FS"
20:51 japhb And perhaps we need to embrace the eventual FAIL.
20:52 FROGGS thats why \w only
20:52 moritz FROGGS: but you know that \w matches more than [a-zA-Z0-9_] ?
20:52 FROGGS no umlauts nor accents
20:52 FROGGS well, I basically mean [a-zA-Z0-9_]
20:52 japhb FROGGS, you still have FAT, or ASCII limited, or EBCDIC, or whatever the hell VMS does.
20:52 FROGGS no locale involved
20:53 japhb (FAT having both character set and severe length limitations)
20:53 FROGGS ohh, there might be 8.3 style filenames :/
20:53 japhb ISTR VMS has some funky limitations too.
20:53 japhb And amazingly, I still see VMS patches float by, even for Parrot IIRC.
20:54 moritz forget about FAT16 and VMS
20:54 supernovus Ultimately instead of depending on the filesystem at all, we could use a manifest for all lookups, and have a 'lib/github_supernovus/XML/3.​0.0/{XML.pm6,XML/Grammar.pm6} type structure and in the manifest, have XML and XML::Grammar listed with pointers to the versions.
20:54 moritz you can't decide the future while clining to all parts of the past
20:54 japhb moritz, I'm just saying that's a valid argument for saying "we can't find a LCD of FS naming that anyone wants" and calling it platform-dependent behavior.  I'm not saying this is an overriding concern.  ;-)
20:55 moritz japhb: agreed
20:55 japhb Personally, I favor FROGGS
20:55 FROGGS me in person?
20:55 japhb er, I favor his suggested mapping, more or less.
20:55 FROGGS ;o)
20:55 moritz :-)
20:55 japhb DEK
20:55 japhb (Damn Enter Key)
20:55 wamba joined #perl6
20:56 FROGGS well, would be nice to campare these strategies with real world (Perl 5) modules
20:56 FROGGS just one with two authors/versions and a few submodules
20:57 supernovus So using FROGGS mapping, we'd have lib/XML_github_supernovus_3.0.0.pm6 and lib/XML/Grammar_github_supernovus_3.0.0.pm6 ?
20:57 japhb supernovus, I am still clinging to the idea that the filesystem representation is understandable to mere humans, and that FS lookup is a fast path that should work in most cases, only forcing parsing of the text file when really needed.
20:57 FROGGS its not really my invention, but moritz's iirc
20:57 FROGGS but it has less dirs
20:57 japhb supernovus, I'd say .../XML/github_supernovus/3.0.0.pm6
20:57 diakopter what about having a directory name for the module's filename as well... so lib/XML/github_supernovus/3.0.0/XML.pm6
20:58 japhb diakopter, Makes the 'Any' magic not work, as well as the collapsed file disambiguation id not work.
20:58 japhb s/file/filename/
20:58 diakopter or lib/XML/Simple/github_supernovus/3.0.0/Simple.pm6
20:58 diakopter I don't know what those two requirements are
20:59 japhb Oh, mentioned in my design gist.
20:59 diakopter I seem to have lost the url; paste plz?
20:59 japhb It's how it maintains a fast path for 'use' when the user doesn't care about version, or the FS has collapsed names because e.g. it is non-case-sensitive.
20:59 japhb sure, hold on
21:00 japhb https://gist.github.com/4158939
21:00 FROGGS so if you have no seperate dir for author and version an Any-lookup would be: lib/Module-(*)-(*).pm6 # * means highest version for example
21:00 japhb FROGGS, and then you are parsing directories in user space, instead of letting the kernel find it AFAP.
21:01 supernovus Uhg. I don't really like the duplication of the module name. lib/XML/github_supernovus/3.0.0.pm6 or lib/XML.github_supernovus.3.0.0.pm6 are both potential candidates in my mind. I do like japhb's proposal to be honest, along with the s/\w+/_/ applied to the auth names.
21:02 diakopter I don't like how the main file has a version number as its filename but modules in child directories don't
21:02 japhb diakopter, what makes you think that?
21:02 moritz oh, while we are at it
21:02 moritz please consider how development works
21:02 moritz people will just want to edit always the same files
21:03 FROGGS well, I can't tell if I like this lib/XML/github_supernovus/3.0.0.pm6 or that more lib/XML.github_supernovus.3.0.0.pm6, both is pretty fine
21:03 moritz and then at some point, mark it as a certain version
21:03 diakopter japhb: let's say XML::Simple contains XML::Simple::Foo:Bar
21:03 moritz so they will run a 'make release VERSION=1234' or so
21:03 diakopter what does the directory/filename structure look like under the author
21:03 moritz and that will copy the files to the right name/location
21:03 FROGGS moritz: the filenames can be build that way when installing
21:03 moritz FROGGS: correct
21:04 japhb diakopter, so it will look like XML/Simple/Foo/Bar/auth/ver.pm.  It's .../auth/ver.pm all the way down.
21:04 moritz but it means the old mode (without any version in the file name) must be supported for development too
21:04 FROGGS .. or when calling ./Build dist
21:05 japhb moritz, that's actually part of what I was cogitating in my (not yet posted) proposal for handling @*INC, but I was caught off guard by the @*INC hate before I pasted that idea.
21:05 japhb I wanted to make sure my idea still worked when thinking about sorear++'s concerns.
21:06 diakopter I really don't like that idea. I think trying to optimize module loading is very premature; I think simplicity is much more important.  there will never be a case where traversing a few directories when loading each module will dominate the time of a script. startup won't be that fast
21:06 japhb diakopter, At my dayjob, we already have scripts whose startup time is dominated by FS effects from badly-designed module loaders.
21:07 moritz diakopter: I agree. Much of the module locating stuff can be sped up with caching
21:07 japhb Not Perl 6, mind you: PHP, Ruby, etc.
21:07 * moritz -> sleep
21:07 japhb g'night, moritz
21:07 rurban_ joined #perl6
21:08 FROGGS the usual case will be to load a module without specifying the author or version, this will end up beeing lib/Module/AUTH/VER.pm
21:08 flussence argh... now I'm reminded how dumb PHP's built in autoloader is
21:08 FROGGS simple lookup
21:08 japhb flussence, EXACTLY.
21:08 diakopter japhb: I think that's fine, but for a module with several packages several layers deep, the number of directories gets huge
21:08 japhb FROGGS, Right, that was my intent.
21:09 japhb diakopter, yes -- that's the way Perl 5 is now.
21:09 japhb And I think it works pretty well.
21:09 diakopter I'm saying the number of directories in your proposal would be quadratically more than P5
21:10 japhb (Remember Perl 5 has auto directories, and share directories, and such, not just Foo/Bar/Baz.pm)
21:10 FROGGS diakopter: I believe you just get twice the amount of dirs than P5
21:10 FROGGS (without auto)
21:11 diakopter lib/Module/AUTH/VER.pm is bad.. lib/Module/AUTH/VER/Module.pm is much better
21:11 diakopter s/much//
21:11 diakopter (imho)
21:11 FROGGS why?
21:11 japhb diakopter, even disregarding that Perl 5 has more directories per module than most people think about, I think a mild explosion of auth/ver directories is to be expected in a multi-install design like S11.
21:12 japhb diakopter, I don't understand why lib/Module/AUTH/VER/Module.pm is a win.  That adds another directory layer!
21:12 diakopter well if you're already going to have a pointer to which version is active, why not have a pointer to which author is active and put author at the top loevel
21:13 FROGGS you mean lib/AUTH/VER/Module.pm then
21:13 japhb diakopter, the auth has to go below the module name, unless you always want to search the disambiguation file.
21:14 diakopter it's trivial to serialize a hash for that
21:14 FROGGS btw, does it makes sense anymore that a submodule needs to be in a subfolder?
21:14 diakopter (like the caching moritz suggested)
21:14 japhb diakopter, then you lose the idea of the FS structure actually making sense to the average sysop.
21:15 japhb FROGGS, I am not sure there's a good way of avoiding that which won't end up with searching up and down directory trees trying to find the closest-but-not-exact filename match.
21:16 diakopter japhb: I don't think Module/AUTH is any easier to understand than AUTH/Module
21:16 japhb sorry, I'm not sure there's a good way of having all submodules in the same folder as their parent module.
21:16 kaare__ joined #perl6
21:16 japhb diakopter, If you're looking for Blitz::Blum, where do you look?
21:17 FROGGS no, then the Any would break...
21:17 japhb Also, I was responding to both lib/AUTH/Module, and lib/HASH
21:17 diakopter like I said, the preloaded hash in memory tells you which author to use
21:17 supernovus None of this takes into account multiple resource directories or binaries in 'bin' either. I think using a manifest for lookups may be better, and simpler. Just stuff the entire contents of any given module distribution into '$auth/$distname/$ver' and depend on the manifest to determine the newest version. Each of those directories has its own 'lib', 'bin', 'doc', 'share', 't', etc. folders.
21:17 diakopter ++
21:17 japhb diakopter, preloaded *when*?  We're trying to avoid having to do a huge caching at startup.
21:18 diakopter the current proposal is also weak for uninstalling
21:18 diakopter deserialized from the disambiguation thing
21:18 japhb diakopter, How do you figure?
21:18 diakopter oh, I guess if there's a manifest
21:18 japhb Right.  :-)
21:19 diakopter I think supernovus' comment is spot-on.
21:19 supernovus Using the manifest version, we could also allow the package manager to switch the "active" binary put into the path.
21:19 diakopter japhb: deserialized from the disambiguation thing
21:20 Rix joined #perl6
21:20 diakopter deserialization and then a hash lookup or two can be quite fast
21:21 supernovus I've been thinking about the fact that many module distributions contain more than just 'lib' and most proposals up til this point have been focused entirely on versioning the contents of 'lib', but what if the binary in 'bin' depends on a specific version of the library (very likely), my updated proposal would save the entire contents of the distribution into a folder.
21:21 japhb OK, but I'm saying you are forcing the parsing of all the disambiguation files in all include trees in order to do *any* module loading at all.
21:22 diakopter sure, why not
21:22 japhb supernovus: If the distribution is named "XML-Simple", but the user says "use XML::Simple::Foo::Bar", or even worse "use XMLHelper::Baz", how do you find it?
21:23 japhb Just relying on the manifest file?
21:23 supernovus supernovus: The manifest would map module names to dists.
21:23 japhb heh
21:23 FROGGS every module must be indexed, to know in what dist it is
21:23 japhb nodnod
21:23 FROGGS like on cpan/pause
21:24 japhb Just making sure we're on the same page; we've had a few accidental talking-past moments in this discussion.  :-)
21:24 fgomez joined #perl6
21:24 japhb OK, so let's see if we're in general agreement:
21:24 japhb 1. We need a mapping of files in the distro to filenames on disk.
21:25 japhb 2. We favor the idea of using one standard mapping for this.
21:25 japhb 3. We need to consider more than just lib files.
21:25 japhb Any disagreements with that so far?
21:25 supernovus That being the one potential pitfall of a manifest-based system. Pros: easy handling of an entire distribution with all of its files. Cons: must parse up to four manifest files in order to find modules.
21:26 kcwu_ joined #perl6
21:26 FROGGS four? why four?
21:26 japhb supernovus, or min(4, +@*INC), if we support that.
21:26 FROGGS ahh, okay
21:26 japhb FROGGS, the current design has 4 lib roots
21:26 FROGGS ya, sure
21:26 supernovus Yeah, that also depends on if @*INC is going to be in there too.
21:27 japhb OK, so disagreements:
21:27 wamba joined #perl6
21:27 supernovus I can't see how to get rid of @*INC, as it is useful in some circumstances, such as test files with custom libraries.
21:27 japhb A. Is the manifest *always* used for lookups, or just when the filesystem doesn't give an immediate unambiguous match?
21:27 FROGGS to 1), I believe its not about files, but modules+auth+version, if you need the bin-dir or share-dir you wnat that of a given module-version
21:28 japhb FROGGS, I understand and agree.
21:28 hjsteffens joined #perl6
21:29 ashleydev joined #perl6
21:29 FROGGS well, I'd say the first match might be Module.pm (without author and version) in @*INC, for development
21:29 japhb B. Do we attempt to mash all files from all distributions into a fixed bin/Foo/BAR, lib/Foo/Bar, share/Foo/Bar/, etc., or do we do distro/{lib,bin,share..}
21:30 diakopter I know which one OS package managers would prefer
21:30 FROGGS I vote for laste approach
21:30 FROGGS -e
21:30 japhb C. Do we consider the text of the use ("use Foo::Bar") pre-eminent in FS layout design, or the auth+manifest?
21:30 japhb Do I have the areas of agreement and disagreement about covered?
21:30 japhb Any I'm missing?
21:31 japhb Oh, I guess in honor of sorear:
21:31 japhb D. Do we support @*INC at all?
21:31 FROGGS I dont understand C
21:32 japhb FROGGS, in other words does the start of the tree go Foo/Bar/<something>, or auth/distro/Foo/Bar?
21:32 FROGGS and for D, I dont want to install my module that I'm currently hacking on just for testing
21:32 japhb I agree.  Despite implementer pain, I think @*INC just needs to exist.
21:33 japhb ... but seeding it sanely might vastly cut down on the frequency of @*INC changes in the real world.
21:33 PerlJam japhb: searched first or last or what?
21:33 supernovus Currently we split up 'bin', 'lib', 'share' into separate folders, which is very unix-like, but doesn't work well if we're tracking multiple versions. I think $auth/$distname/$ver/{lib,bin,share,doc,t} with some form of mapping is better.  That said, we need to be able to support the current system as well.
21:34 FROGGS japhb: D) if @INC is empty by default and I'll be able to add something to it that would suffice
21:34 japhb PerlJam, I *assumed* that the default @*INC would include the four standard roots.
21:34 sorear good * #perl6
21:34 PerlJam japhb: ok.
21:34 diakopter strawberry perl doesn't use symlinks for its bin directories; it uses .bat wrappers for stuff installed there
21:34 japhb sorear, Hello there!
21:35 FROGGS japhb: for C) I dont care if the files will be looked up by manifests
21:35 FROGGS hi sorear
21:35 supernovus If I am testing something, with a custom @*INC, I want to be able to load somedir/Foo.pm6 by calling "use Foo".
21:36 japhb The one big thing about the all-manifests-all-the-time approach is that if we're supporting @*INC ... what supernovus said.
21:36 diakopter right, you don't want to have to 'make' it
21:36 FROGGS supernovus: right, but I woulnt care to put a use lib right before use Foo
21:36 japhb Which brings back one of the reasons I favor the FS-first-then-manifest approach.
21:36 supernovus Basically, the ability to support the current structure, unchanged, as well as a new structure with versioning and authority information taken into account.
21:37 japhb supernovus, right, so the design has to handle both ... unless we decide that we're going to nix the old way.
21:37 sirrobert what does $distro refer to in "$auth/$distro/$version/" ?
21:37 sirrobert as in name of project?
21:38 supernovus sirrobert: The name of the project.
21:38 sirrobert ok
21:39 flussence speaking as a real end-user: any solution to this where I can't tab-complete from an obvious starting point and have to resort to `locate` is a huge WTF.
21:39 stopbit joined #perl6
21:40 supernovus I cannot resolve perlfoundation.org, can someone see who I should e-mail my CLA to?
21:40 japhb flussence, that matches my thinking
21:40 FROGGS supernovus: I can, hold on
21:40 Khisanth joined #perl6
21:40 japhb supernovus, note that tadzik emailed a scan of the signed printout, IIRC.
21:40 diakopter http://web.archive.org/web/201107212​23648/http://www.perlfoundation.org/
21:40 FROGGS supernovus: I mailed it to pr@perlfoundation.org which is the only address you get there
21:40 Vlavv_ joined #perl6
21:41 PerlJam japhb, flussence: watching this discussion makes me wish that filesystem paths weren't even in it.
21:41 FROGGS japhb: I did that too
21:41 flussence (as an aside, this is already the case now that ~/.perl6 is no longer used)
21:41 supernovus FROGGS: e-mailing it there worked for you?
21:41 supernovus flussence: where do modules go if not in ~/.perl6 ?
21:41 sirrobert flussence: it isn't?
21:41 FROGGS well, I was able to send the mail last wek
21:41 FROGGS week
21:41 FROGGS but you wont get any answer according to masak or tadzik or me yet
21:42 flussence as far as I can tell, for me they're all in ~/code/rakudo/install/lib/parrot/​4.4.0-devel/languages/perl6/site/
21:42 japhb supernovus, %*CUSTOM_LIB< home site vendor perl>
21:42 sirrobert supernovus:  I would love to have deps installed in a project root (a la node.js).  per-project libs.
21:42 sirrobert I think node.js nailed it on that one.
21:44 japhb sirrobert, understood and agreed that is useful.
21:45 sirrobert fwiw, as an end-user myself, I would prefer something like <lib>/$auth/$distro/$ver/Foo/Bar.pm myself, I think.
21:46 japhb sirrobert, where do you stand on the location of bin/ and share/ files and the like?
21:46 PerlJam I think that we'll need an actual implementation before any of us *really* knows what to think  :)
21:47 sirrobert japhb:  if I understand the problem correctly, I'd put them under $auth/$distro/$ver/[lib|bin|share]
21:47 diakopter for the bin directories, you also should consider what the user does with the PATH
21:47 FROGGS an example (including bin and share) would be helpful I guess
21:47 diakopter you don't want the user to have to add version-specific dirs to the path
21:47 sirrobert diakopter: but you want them to be able to, unless the libs are project-specific.
21:48 FROGGS diakopter: if you have several versions of a binary installed, you need to have a version as a dir somewhere
21:48 diakopter I realize, but the user will just want "a version"
21:49 diakopter what's the use of installing a module with an executable if you can't execute it right off the bat
21:49 sirrobert then just do the most recent version (by number)
21:49 japhb diakopter, this discussion reminds me of the Debian alternatives concept.
21:49 japhb You have lots of stuff installed, and a directory of symlinks for the version a shell user will see.
21:49 diakopter alternatives++
21:50 diakopter (stub shell scripts that dispatch to particular versions)?
21:50 diakopter (already done on strawberry)
21:51 * japhb mildly fears stub shell scripts that start off by parsing the manifest files ...
21:52 sirrobert is the problem with executables that they wouldn't be in $PATH?
21:52 supernovus sirrobert: per-project deps, that's pretty awesome actually.
21:52 sirrobert supernovus: I thought it was pretty neat when I first read about it
21:53 sirrobert supernovus:  then I used it in several projects... I was wrong, it's The Right Thing.
21:53 sirrobert =)
21:53 japhb supernovus, see also Ruby bundles.
21:53 sirrobert japhb:  bundles++
21:54 japhb sirrobert, yeah, the path explosion problem is a biggie, if you have lots of uninstalled module packages, each with bin/ dirs.
21:54 sirrobert fwiw, when I install r* right now, I do it in:  ~/.perl6/rakudo-star-2012.11/install
21:54 japhb Just remembering to set $PATH properly can be a pain, especially with version-dependent directories.
21:55 japhb (Well, assuming that my 'Any' version proposal doesn't win)
21:55 arnsholt joined #perl6
21:55 supernovus So many possibilities. We want to keep Perl 6 as flexible as possible, but still have sane defaults to back up to. Maybe having versioning in the "use statements" isn't important at all, if we have per-project bundles, the ability to say "panda install XML -version 3.0.0 -to ./my-project/lib" would be more useful.
21:56 sirrobert the script I use automatically symlinks:  ln -s ~/.perl6/rakudo-star-2012.11/install/bin ~/.perl6/bin-2012.11; rm ~/.perl6/bin; ln -s ~/.perl6/bin-2012.11 ~/.perl6/bin
21:56 sirrobert my path contains $PATH:~/.perl6/bin
21:56 sirrobert a system like that could help.
21:57 japhb supernovus, I think some of the original S11 design concept was that multiple versions of modules could be installed by the system package manager, not just by individual users.
21:57 sirrobert basically the "latest version" is symlinked to something in my $PATH on install
21:58 japhb sirrobert, I do something similar.  :-)
21:58 supernovus japhb: Yeah, the per-package system is great, but the ability to also have shared versions installed system-wide is desirable too. How to keep it flexible, supporting both, without making it a monstrosity?
21:59 japhb I think you've just summarized the last hour or so.  :-)
22:00 sirrobert I think a developer version of "use" that uses some canonical path, but also gives a warning (which developers can ignore) could be a good idea.
22:00 japhb OK, I think the gist of discussion is that my proposal was a decent starting point, but there is a lot more that needs to be considered for a second draft.
22:00 japhb sirrobert, why make a different 'use'?
22:00 japhb What does that gain you?
22:01 sirrobert japhb:  doesn't have to be a different "use", necessarily... but someone (FROGGS?) was saying they don't want to have to install while developing.
22:01 sirrobert (which makes sense)
22:02 sirrobert but I think treating developers differently than end-users is reasonable, as long as you don't treat them *worse* =)
22:02 supernovus Well, that's pretty much what it boils down to. We want to be able to support many different ways of using Perl 6, which includes %*CUSTOM_LIB, @*INC, "use lib", project-specific library-sets, system-wide library installations, etc. While not turning into something entirely insane at the same time.
22:02 japhb sure.  My question is, do we gain by keeping the loading systems separate, or on the other hand by making use DWIM?
22:02 japhb sure.  My question is, do we gain by keeping the loading systems separate, or on the other hand by making use DWIM?
22:02 japhb oops
22:02 wamba1 joined #perl6
22:04 * japhb is going to have some serious tanking to do.
22:04 rurban_ joined #perl6
22:05 sirrobert What we gain from keeping it separate is a sense of "best practice" (without a mandate)
22:05 supernovus There, e-mailed the CLA. I'll snail-mail it too.
22:05 sirrobert but people using the system differently at least know how they are using it.  Sometimes transparency is desirable, but sometimes we should prefer a certain amount of *training* for new users
22:06 sirrobert for a given practice, it will be very DWIMmy, and a tiny bit of training helps reduce headaches, unless someone wants to deviate *on purpose* =)
22:08 supernovus Well, if we want to use a project-specific folder, we can do a "use lib './lib';" type statement, which would be the same as doing "BEGIN @*INC.unshift: './lib';" and then we'd need a way to make panda install modules into that directory.
22:10 sirrobert supernovus: according to tadzik, there's already a param you can pass in to panda to do that.  making it default should be easy enough.
22:10 diakopter japhb: I don't see anything wrong with using symlinks anywhere, FYI. Windows distributions can always include a utility to do the symlinking on Windows (since Windows 2000)
22:11 diakopter er
22:11 japhb diakopter, Good to know.
22:11 japhb Thanks.  :-)
22:11 DarthGandalf joined #perl6
22:11 diakopter junctions since 2000, symbolic since Vista
22:12 japhb "junctions"?
22:12 diakopter junction is sufficient
22:12 diakopter http://en.wikipedia.org/wiki/NTFS_symbolic_link
22:12 diakopter links to junction
22:13 japhb Weird. dir-only symlink, basically
22:14 sirrobert heh
22:14 FROGGS gnight pals, I'll read the logs and I'm really looking forward to it... japhb++
22:14 tadzik according to me? :)
22:15 sirrobert tadzik:  you told me that a long time ago, I believe =)
22:15 tadzik oh, DESTDIR
22:15 sirrobert yep
22:15 tadzik it may work, yes :>
22:15 sirrobert heh
22:15 tadzik or if you mean a Panda object, then for sure
22:15 tadzik probably also called destdir
22:15 tadzik emmentaler uses that to test modules in a "sandbox"
22:19 donaldh joined #perl6
22:22 * TimToady is limping along on GoogleWiFi because our home network is offline; currently in the middle of an upgrade from DSL to almost-fiber, and our copper isn't cutting it...
22:22 TimToady at least we have GoogleWiFi--there are a few advantages to living in GoogleTown
22:23 masak TimToady! \o/
22:25 sorear \o/
22:25 bluescreen10 joined #perl6
22:26 pmurias joined #perl6
22:29 bluescreen10 joined #perl6
22:29 sirrobert =)
22:31 lue hello o/
22:33 pmurias re mapping module versions to filenames does any of the proposed schemes supports finding a version matching a given range?
22:33 phenny pmurias: 25 Nov 00:32Z <jnthn> tell pmurias !cursor_next handles it; the bstack survives and it hands back a 1 for restart, which makes the generated code jump straight to fail (and thus it backtracks and produces the next feasible cursor)
22:33 lue I again vote for removing @*INC and having C<use> work in like C/++'s #include (name of module in standard path or string literal to file in a nonstandard path)
22:34 pmurias a searching the whole @*INC everytime doesn't seem a particulary good solution
22:35 lue s:s/in like/like in/
22:36 pmurias lue: and the standard path is?
22:36 lue e.g.  use Foo::Bar;  or  use "./lib/Foo/Bar.pm"; (the string literal would accomplish what  BEGIN { @*INC.push } does)
22:36 lue pmurias: what's configured before compiling the compiler (although I don't know what specific paths would be best)
22:38 pmurias that's a bad idea
22:39 lue As far as I know, that's how gcc works (or am I wrong there?).
22:40 pmurias yes
22:40 flussence `man ld-linux.so` mentions some absolutely horrible things, now that you mention it...
22:40 pmurias but the C build model is the last thing we want to emulate
22:42 flussence ("/usr/lib/sse2/acpi/" is a valid shared lib directory and it'll look in there)
22:43 lue In any case, I'd much prefer  use "local/file.pm6";  to  BEGIN { @*INC.push("local"); }; use file; (and have always missed being able to do this. Sometimes I don't want to think of an included file as a module.)
22:44 dalek perl6-roast-data: a2b7b7a | coke++ | / (3 files):
22:44 dalek perl6-roast-data: today (automated commit)
22:44 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/a2b7b7ae1a
22:44 lue (I know there's C<require>, but I don't remember it working.)
22:45 * lue wonders what's so wrong with the C build model
22:46 pmurias do you have looked at a build system for a large C(++) program?
22:47 lue I've seen them, but never worked in them.
22:48 pmurias you have read the Makefiles?
22:49 lue yes. (But Makefiles never look fun)
22:50 flussence the makefiles aren't the worst part... :)
22:50 bowtie joined #perl6
22:50 pmurias the autoconf tools are worse ;)
22:51 huf i've had better experiences with hand-written hand-editable makefiles that source a platform-specific settings-makefile
22:51 lue That's not the C build model to me though, that's the Makefile build system.
22:51 huf than with auto*
22:53 * lue has only heard legends of auto*'s awfulness
22:55 fgomez joined #perl6
22:57 lue I'm not sure I actually see what benefit @*INC provides over an #include style use.
22:57 huf the language knows what it has included
22:58 geekosaur it's awful, but most of the alternatives I've seen are worse.  it's a hard problem
22:59 lue (not the preprocessor aspect of #include, but the "I can include a local file easily" part)
22:59 donaldh local to where?
23:00 donaldh @*INC separates environment from program.
23:00 huf #include has an INC too
23:00 huf have fun trying to make gcc print it tho :D
23:00 donaldh Even C includes should just be relative to -I path
23:00 huf altho i think i found some odd way a few weeks ago... hmm
23:01 lue Instead of using @*INC in a BEGIN phaser to test a library, you just do use "../lib/File.pm6";
23:01 donaldh lue: and what is your working directory?
23:01 huf cwd, like perl5's require :)
23:02 huf logical but mostly useless :)
23:02 lue P6 has require too, but it hasn't always worked and is runtime instead of compiletime.
23:02 donaldh So the program can only run in a fixed location.
23:02 huf p5's require is also runtime
23:03 lue can @*INC be changed any time after the program starts (including phasers into the starting process)?
23:03 huf and surely if your program modifies its INC before loading stuff, it can do aaanything
23:04 lue If you can change @*INC during execution ("now that I've parsed your input file, let's change @*INC !"), that feels like a Bad Thing™ (and thus I agree with sorear).
23:05 lue .oO(why not give perl6 a -I commandline option too?)
23:05 huf lue: but you often want the lib/ dir next to the executable
23:06 sirrobert lue:  there already is one
23:06 huf that's i think the most common reason people muck with the INC at runtime
23:06 sirrobert lue:  perl6 -Iblib/lib foo.p6
23:07 donaldh perl 5 too
23:07 lue Cool, I thought there wasn't.
23:09 donaldh Interesting. In perl6 -I is not documented in --help
23:09 donaldh It says: PERL6LIB="lib" perl6 example.pl
23:10 lue I'm afraid I still don't see the benefits of a runtime-modifiable @*INC (if you need to modify @*INC before C<require>ing something, well, C<require> accepts paths in a string variable)
23:14 donaldh sophisticated module management.
23:15 donaldh e.g. bundling DBD drivers in their own INC directories.
23:15 huf well, depends. but you're right, it's more useful to modify it in the middle of compile :)
23:16 donaldh require a which in turn uses b and c which use ...
23:17 donaldh I think, a path argument to require only solves one level of indirection.
23:18 huf yeah, hence use lib in perl5 (and also require accepting package name barewords, but only as literals)
23:21 donaldh it's really important to separate environment from program, so that libs are portable across environments.
23:21 * lue doesn't get how modifying @*INC in-program separates the environment from the program...
23:22 sirrobert phenny:  tell jnthn I think the perl6-debug in rakudo-star-2012.11-RC1 steps over method/function calls by default, instead of stepping into them.
23:22 phenny sirrobert: I'll pass that on when jnthn is around.
23:25 hash_table joined #perl6
23:26 donaldh DB.connect("sqlite:fred") might then do @*INC.push($driverDir ~~ '/' ~~ $driver); require $driver; so that sqlite can load its own modules.
23:27 donaldh The sqlite driver would then be independent of its environment.
23:28 lue where does $driverDir come from?
23:28 lue &
23:28 whiteknight joined #perl6
23:28 donaldh A hypothetical configuration variable for DB.
23:29 huf lue: most common p5 use: use lib dirname(__FILE__).'/lib'; use My::Very::Own::Wiggle; # so now wherever you run foo.pl from, it'll find its own lib/ dir next to itself.
23:29 flussence r: qp{o/n.m}
23:29 p6eval rakudo 247f87: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&qp' called (line 1)␤Undefined routine '&o' called (line 1)␤Undefined routine '&n' called (line 1)␤»
23:30 huf ... and also wherever you move foo.pl and its lib/ it'll still work.
23:31 sorear nodejs and the CLR do that automatically
23:32 flussence oddly enough, the last serious thing I wrote in PHP used almost exactly that line...
23:32 huf yes, it's not the nicest of the incantations...
23:32 donaldh sorear: local indirection? Do they? nice.
23:33 flussence (if anyone was wondering: function __autoload($class) { require dirname(__FILE__).'/lib/'.str​tr($class,'\\','/').'.phps'; } )
23:33 sorear donaldh: yeah, one of the default module search paths is relative to the location of the using code
23:35 donaldh sorear: hopefully the first one.
23:36 * donaldh thinks he'd always want to search self relative lib first.
23:37 skids joined #perl6
23:52 masak 'night, #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo