Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-15

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:00 Psyche^ joined #perl6
00:04 jnthn Time for some rest. o/
00:04 macroron joined #perl6
00:05 thowe joined #perl6
00:05 thowe ls
00:24 ajs joined #perl6
00:27 ajs I have a module with "multi sub infix:<+>(Foo $lhs, Foo $rhs) is export { ... }" in it. But when I use that module and then try to add two Foos, I get "Can't take numeric value for object of type Foo"... am I doing that wrong?
00:29 TimToady perhaps you need to define how to convert a numeric value to a Foo
00:31 TimToady sorear: no, I didn't see the question, but the existence of such a question is sufficient for me to see a problem.  :)
00:34 sorear STD.pm6 doesn't implement matchification very well
00:34 TimToady attaching action rules to derived grammars is pretty easy when they're named, and pretty hard when they're anonymos
00:34 sorear so I cheat using $M->isa('STD::Regex') etc
00:34 TimToady *mous
00:35 sorear the most important colliding names are nibbler, LIST, and backslash
00:35 TimToady well, at least those are named subgrammars
00:35 TimToady the main trickiness is for the reduction to know the pedigree
00:35 sorear how does that help me?
00:36 sorear AFAICT my code only works because of a bug in Cursor
00:36 TimToady so insted of calling, say Actions::nibbler it can call Actions::Regex::nibbler
00:36 sorear _MATCHIFY should be reblessing to Match and erasing the grammar pedigree
00:36 sorear but Cursor doesn't have a Match yet
00:39 TimToady well, MATCHIFY may be misnamed
00:40 TimToady at most, it creates a Cursor that can act a bit like a Match object
00:41 pmichaud TimToady: when you get a chance, I didn't quite follow your answer to my earlier @_ question (more)
00:41 pmichaud in particular, I'm wondering if @_ should allow modification of its arguments, as in p5
00:42 _jaldhar joined #perl6
00:42 pmichaud (assuming the arguments are lvalues, of course)
00:43 TimToady I'm saying (if that's the most efficient way to do it), it should allow it if you can get away with it, but the compiler is allowed to complain if it notices
00:44 _jaldhar joined #perl6
00:45 TimToady sorear: real matchification is done by a wrapper such as m// or .match
00:45 pmichaud the "compiler is allowed" part is the part I don't understand.  Some p6 implementations would be able to disallow argument modification through @_, while others could allow it?  That seems very inconsistent
00:45 TimToady that's what "erroneous" means
00:45 TimToady the compiler may complain but is not required to
00:46 TimToady because it may be too difficult to determine
00:46 pmichaud okay, so the answer I guess I"m hearing is that @_ in p6 doesn't have a way to act like @_ in p5?
00:46 tom_tsuruhara joined #perl6
00:46 TimToady but they're *supposed* to use "is rw" or "is parcel" to give explicit instruction
00:46 simcop2387 joined #perl6
00:47 pmichaud okay,  so  sub xyz(*@_ is rw)  {...}  is the normal way to do it?
00:47 TimToady that would require all the args to be rw, parcel would allow some of them to be, and not complain on @[42] = 3
00:48 pmichaud is that specific to slurpies, or is that true for positional parameters in general?
00:48 pmichaud sub xyz(@abc is rw) { ... }   # how does this differ from  sub xyz(@abc) { ... }  ?
00:50 TimToady well, enforcement levels may be different between positionals and slurpies, but the intent is that, without rw, @abc.push should be either an error or erroneous
00:50 TimToady it seems more worthwhile enforcing that for positionals, somehow
00:51 pmichaud so, .push, .pop, etc.  need to check the "readonly" nature of the invocant?
00:51 TimToady maybe readonly proxies is one of those things you can turn off for efficiency after you're sure you're okay
00:51 pmichaud so far we haven't had any methods that restrict manipulation of the invocant
00:51 TimToady the invocant is probably born rw
00:52 TimToady well, maybe not
00:52 pmichaud that's what gets kinda of weird.
00:52 TimToady doesn't matter for $item really
00:52 pmichaud sub abc($a) { $a.push(5); };  my @xyz = 1,2,3;  abc(@foo);  # error?
00:52 TimToady but array methods are rare enough that we could require @array is rw: @args, I suppose
00:52 pmichaud er, @array
00:52 pmichaud er, @xyz  # !!!
00:52 pmichaud sub abc($a) { $a.push(5); };  my @xyz = 1,2,3;  abc(@xyz);  # error?
00:54 TimToady readonliness doesn't go down normal method calls, I suspect, though I can argue it the other way too
00:54 pmichaud right, so if readonliness doesn't go down normal method calls, what makes  @a.push different?
00:55 TimToady the proxy builder knows it's building an array proxy, maybe?
00:56 TimToady ("knows" being static knowledge here)
00:56 pmichaud so far we haven't had our "proxies"  intercepting method calls
00:56 pmichaud or changing the meaning of them
00:57 TimToady people are going to expect readonlyness to apply to the whole composite container, though
00:58 pmichaud if @abc is readonly and denies .push, I'd expect that $a would be readonly and deny .push also
00:58 TimToady that's a very reasonable position
00:58 pmichaud so then we'd say that .push requires its invocant to be "rw" ?
00:59 TimToady it may well work better to have a capabilities wrapper than a constraints wrapper
01:00 TimToady the abstract model is that every mutable type is just a wrapper for the "current" immutable value
01:00 TimToady of course, arrays and hashes want to cheat on this
01:01 TimToady as do strings from time to time
01:01 pmichaud going back to an earlier example, if we have
01:01 TimToady but there's some kind of purity about, once you strip off the rw wrapper, you can't put it back on again
01:01 pmichaud sub abc(@xyz) { @xyz[0] = 4;  };   my @def = 1,2,3,4;  abc(@def);
01:02 pmichaud does readonly-ness also extend to the elements in the container, as well as the container itself?
01:06 TimToady the slots are part of the container, so yes
01:06 pmichaud okay.
01:06 TimToady for the direct assignment to a slot, not for methods on that slot
01:07 pmichaud well, I suspect that  postcircumfix:<[ ]>  on a readonly array would need to return a readonly proxy to its slot
01:07 TimToady sorry 'bout the delay, the circuit breaker in my kitchen blew, taking down the WiFi
01:07 pmichaud or, more precisely, it returns the value and not the slot
01:07 sorear remember to take $foo[12] into account
01:07 pmichaud (the readonly value)
01:07 pmichaud sorear: yes, got it.
01:08 pmichaud sorear: internally, Rakudo treats those the same righ tnow.
01:10 pmichaud okay, those clues help a lot.  thanks.
01:10 pmichaud another related question:
01:10 pmichaud my @a;  say @a.defined;  #  false?
01:11 TimToady after we split out Nil from (), I expect it to be false
01:11 TimToady it may be fairly artificial
01:11 TimToady depending primarily on whether you've most recently said @a = Nil vs @a = ()
01:12 TimToady where = Nil represents un-initialization
01:12 pmichaud is splitting Nil from () the likely result?  Rakudo had it that way last year (was declared incorrect) and now it's a bit disturbing to be going back to that
01:12 TimToady well, I'd let you say "I told you so"  :)
01:12 pmichaud that would help.  :)
01:13 pmichaud what does Nil become, if no longer () ?
01:13 pmichaud Perhaps Nil is really just Parcel ?
01:13 TimToady the Nil eqv () notion, while seemingly simpler, seems to produce heartburn
01:13 pmichaud i.e., the Parcel type object?
01:13 TimToady yes, perhaps it's an alias for that
01:14 pmichaud that way it still has the aspects of a Parcel, but is undefined
01:14 TimToady but that has problems too
01:14 TimToady I'm still not quite sure that Nil is a type
01:14 TimToady unless it's "bottom"
01:14 pmichaud I did like turning it into a constant a few weeks ago :)
01:14 TimToady I think it's a singleton constant that represents the absence of anything meaningful
01:14 pmichaud I don't have any particular heartburn over making it into a "bottom type".
01:15 pmichaud Or a special constent, sort of like EMPTY  (do we still need EMPTY?)
01:15 TimToady perhaps even our "doesn't exist" value
01:15 TimToady I think we got EMPTY to go away, but Nil is very like it
01:15 TimToady except that Nil just interpolates nothing, like ()
01:16 pmichaud possibly related:   should  ().item  result in an empty Seq ?
01:16 TimToady and Nil doesn't terminate any outer list like EMPTY did
01:16 pmichaud currently  (1,2,3).item  becomes a Seq
01:16 TimToady well, I'd really like to make .item into a no-op, but maybe
01:17 pmichaud and   (1,@abc,3).item  is a Seq
01:17 pmichaud (so that we get the flattening behavior of parcels)
01:17 TimToady whereas Nil.item is probably Failure
01:17 TimToady or Uninit, or something
01:17 pmichaud Failure seems good
01:18 TimToady though .item is not the same as .[9]
01:18 TimToady .[0] rather
01:18 pmichaud right
01:18 pmichaud anyway, if   ().item  is undefined somehow, then Nil could perhaps remain as ()
01:19 pmichaud (just brainstorming)
01:19 TimToady well, I thought about just defining () to be undefined, but it seems problematic
01:19 sorear Wait, we got rid of EMPTY!?
01:19 TimToady because the concept of 0 is fairly well defined
01:19 pmichaud I suspect that the way to make something undefined would be to use "undefine", as opposed to assigning Nil to it
01:19 * sorear still has EMPTYT
01:19 pmichaud sorear: I haven't needed EMPTY in Rakudo since the list/iterator refactor
01:20 pmichaud sorear: if there's a case where we still need it, it can remain spec
01:20 pmichaud but I'd need the use case :)
01:21 TimToady rakudo doesn't need EMPTY in the same sense that STD never needs an end of list marker
01:21 TimToady the list just runs out if it can't return another cursor
01:21 sorear I seem to have copied Rakudo's list code wrong then
01:21 pmichaud correct.
01:21 TimToady cursors are supposed to be immutable, at least in theory
01:22 TimToady (yeah, STD cheats on that)
01:22 sorear niecza's iterators have $.value and $.next, and the .value === EMPTY for the end of list
01:22 TimToady why not just no .next?
01:22 pmichaud there may be some fragments of EMPTY floating around in Rakudo, but those are fossils
01:22 pmichaud Rakudo's iterators just keep track of whatever they reified to and return that
01:22 sorear TimToady: because then it's impossible to create a lazy empty list
01:22 pmichaud (which may or may not include a $.next iterator)
01:23 sorear yeah my iterators are pretty broken
01:23 sorear $it.validate unless $it.valid; $it.value
01:24 TimToady for an empty list you don't have any cursors to reify in the first place
01:24 TimToady (list being a mutable wrapper around a set of reified values and imaginary feeds)
01:25 sorear I mean more like
01:25 sorear my @arr = lines "http://slow.com/empty-file";
01:26 sorear # Should return immediately
01:26 sorear s/=/:=/
01:27 TimToady yes, the bind should just steal the iterators, more or less
01:27 pmichaud that's what currently happens in Rakudo
01:28 pmichaud (depending on the degree of laziness you're looking for here... it would likely open the connection, but not read any lines until needed by @a)
01:28 pmichaud (but that may change with lazy IO objects, too)
01:28 TimToady in fact, arguably, stealable iterators is the thing that distinguishes a list from an array, which must clone iterators to be multi-iterable
01:28 pmichaud s/lazy IO objects/lazy IO opens/
01:30 pmichaud TimToady: so, you're currently leaning towards "Nil as special" as opposed to "() can be undefined"?
01:30 pmichaud what problems do you envision with () as undefined, ooc?
01:32 sorear TimToady: I am having trouble reconciling your talk of stripping layers of rw-ness with my $a = 2; my $b ::= $a; $a = 1; ok $b == 1
01:32 sorear Unless the test is wrong
01:32 sorear (Which would actually be a great outcome for me, I think(
01:32 pmichaud ...is that a current test?
01:32 pmichaud I'd argue that test is wrong.
01:33 pmichaud no, wait
01:33 pmichaud I'd argue the test is correct.
01:33 pmichaud (sorry, got my negatives backwards)
01:35 TimToady you don't want () to be undefined, or my @foo = function // die; can never return () as a defined new value for @foo
01:36 TimToady er, function()  :)
01:37 TimToady which, if () is defined, can return () to return nothing, or just say 'return;' to indicate that it doesn't expect its return value to be used at all
01:37 TimToady assuming return; defaults to return Nil
01:38 pmichaud okay.  Now that you mention it, this argument sounds strangely familiar.... :)
01:41 whiteknight if I use postcircumfix:<[ ]> as an lvalue, rakudo assumes I'm returning a container to assign into?
01:41 pmichaud whiteknight: it depends more on what you're using postcircumfix:<[ ]> on
01:42 pmichaud arrays already have containers for each element, so they return those directly
01:42 whiteknight pmichaud: I'm writing a matrix type for Rakudo that wraps PMCs I've written for the parrot-linear-algebra project
01:42 TimToady it assumes it should return something that can create a container to assign to via WHENCE if the element doesn't exist yet
01:42 pmichaud other types return values that may or may not be containers, depending on the base type
01:43 pmichaud anyway, lvalue-ness isn't built into the postcircumfix:<[ ]> operator itself.
01:43 sorear whiteknight: container lvalues in Parrot are the reason I gave up on blizkost.  You have been warned.
01:43 whiteknight what I really want is to be able to translate $foo[1, 2] = $bar into something like &set_at(1, 2, $bar)
01:44 sorear you'll need to use Proxy for that
01:44 whiteknight since I don't have a reference to a cell in the matrix, it's just a buffer
01:44 pmichaud whiteknight: well, that doesn't really fit with p6 syntax,  since  $foo[1,2]  would normally be a slice
01:44 pmichaud (returning the second and third elements of $foo)
01:44 sorear has Proxy been reimplemented in Rakudo since branches/list?
01:45 pmichaud sorear: no; we also haven't needed Proxy.  Basically anything that supports STORE as a method can be a proxy, though.
01:45 sorear (as pmichaud points out the correct p6syntax is @foo[1; 2] = $bar
01:45 sorear (
01:45 sorear ))
01:45 pmichaud (and rakudo doesn't support the slicel syntax yet)
01:45 whiteknight pmichaud: what then is the syntax for multidimensional array indexing?
01:45 sorear pmichaud: we haven't *needed* Proxy but it's still useful to have
01:45 whiteknight $foo[1][2]?
01:45 pmichaud whiteknight: or  $foo[1;2]   as sorear++ noted above
01:45 whiteknight ah, ok.
01:46 pmichaud but again, nyi in Rakudo.
01:46 ___damog joined #perl6
01:46 pmichaud you could potentially get  $foo[1][2] to work, but then $foo[1] needs to return something that can be subsequently indexed as [2]
01:46 whiteknight it doesn't, in this case
01:47 pmichaud sorear: since Proxy wasn't/isn't officially "spec"  I didn't feel comfortable leaving it in yet.
01:47 pmichaud (yes, Proxy is mentioned in S06, but I consider that more "fossil" than "official" given its age)
01:47 whiteknight okay, so the best thing I could do is create my own proxy object for my matrix types? Or, should I just disallow postcircumfix:<[ ]> because it's too complicate in this case?
01:48 pmichaud whiteknight: yes, one of those should work.  In rakudo, the current mechanism to provide .[ ]  access is to overload the "at_pos" method.
01:48 whiteknight ok
01:49 pmichaud it *is* possible to completely overload postcircumfix:<[ ]>, and then you could get $foo[1,2] to work, but it would ultimately clash with other P6 forms of aggregate access
01:50 pmichaud I suspect it also wouldn't be too difficult to get a basic form of slicels implemented in Rakudo.
01:50 whiteknight the syntax to use for it is not a concern for me. I'm mostly just concerned with the mechanism for using postcircumfix:<[ ]> as an lvalue in one of my matrices
01:52 pmichaud right now postcircumfix:<[ ]>  simply returns the container directly (for arrays)
01:52 pmichaud and then that can be assigned to
01:52 pmichaud (since containers are normally lvalues already)
01:53 sorear I am now fairly convinced that ::= should strip the old container entirely off
01:53 sorear so changing the container doesn't affect the binding
01:55 pmichaud I don't think I'd have a problem with that.
01:55 pmichaud I've just been following whatever is requested by the spectests :-)
02:05 simcop2387 joined #perl6
02:11 dalek book: 6151b71 | (Nikolai Prokoschenko)++ |  (7 files):
02:11 dalek book: * Introduce new book cover by Sebastian Riedel
02:11 dalek book: * Include CC license in the back cover
02:12 dalek joined #perl6
02:13 kst joined #perl6
02:15 forrest joined #perl6
02:17 tylercurtis rakudo: my $a; say $a.perl; my @b; say @b.perl; my @b := $a; say $a.perl; say @b.perl; say $a =:= @b;
02:17 p6eval rakudo 9e1bcd: OUTPUT«===SORRY!===␤Redeclaration of symbol @b at line 22, near " := $a; sa"␤»
02:17 tylercurtis rakudo: my $a; say $a.perl; my @b; say @b.perl; @b := $a; say $a.perl; say @b.perl; say $a =:= @b;
02:17 p6eval rakudo 9e1bcd: OUTPUT«Any␤[]␤Any␤Any␤0␤»
02:18 tylercurtis Should that be allowed>
02:18 tylercurtis ?
02:26 sorear Yes
02:26 sorear Any can be used as an array container
02:26 sorear That's how @foo[0][0] works
02:27 tylercurtis Ah, right.
02:29 pmichaud I suspect @b := $a should be disallowed
02:29 pmichaud since Any !~~ Positional
02:29 pmichaud so that's likely a rakudo bug.
02:29 pmichaud (known)
02:30 pmichaud rakudo:  my @b := 1;
02:30 p6eval rakudo 9e1bcd:  ( no output )
02:30 pmichaud rakudo:  my @b := 1;  say @b;
02:30 p6eval rakudo 9e1bcd: OUTPUT«1␤»
02:30 pmichaud yeah, bug.
02:37 treed joined #perl6
02:37 treed Hey guys.
02:38 treed I don't suppose there's an API reference for Perl6 yet? Something that documents the methods for each class?
02:38 treed I found Class.HOW.methods, but it doesn't seem like it restricts to the class I actually asked about, and doesn't tell you what each thing actually does.
02:46 sorear Try .^methods(:local)
02:48 treed Aha, that helps.
02:49 treed But still doesn't tell me what they each do.
02:49 treed I'm actually looking for a way to either reverse a string or to at least access the individual chars so that I can reverse them myself.
02:51 ashleydev joined #perl6
02:51 plobsing rakudo: "abc".flip
02:51 p6eval rakudo 9e1bcd:  ( no output )
02:52 plobsing rakudo: "abc".flip.say
02:52 p6eval rakudo 9e1bcd: OUTPUT«cba␤»
02:53 kst joined #perl6
02:57 treed huh. That's not listed in methods.
02:58 plobsing it's under Cool
02:59 treed What's Cool?
03:01 pmichaud http://perlgeek.de/blog-en/perl-6/cool.html
03:01 plobsing sort of a catch-all for perl-ish behaviour. also a really hard typename to google
03:15 drbean joined #perl6
03:17 Tene treed: if you still want a list of chars, use split
03:18 Tene rakudo: say "abcde".split('').perl
03:18 p6eval rakudo 9e1bcd: OUTPUT«("a", "b", "c", "d", "e")␤»
03:18 pmichaud or .comb
03:18 pmichaud rakudo:  say "abcde".comb(/./).perl
03:18 p6eval rakudo 9e1bcd: OUTPUT«("a", "b", "c", "d", "e")␤»
03:19 risou joined #perl6
03:20 sorear TimToady: I suppose you've heard the news that package Foo { } is legal perl5 syntax now?
03:24 treed Thanks, guys.
03:35 Holy_Cow joined #perl6
03:37 kst joined #perl6
03:48 ashleyde1 theme
04:02 sorear From now on I'm going to call simple Perl 6 stuff like Int, Num, Str perinative types.
04:31 redicaps joined #perl6
04:35 sorear How antisocial would it be for me to overide _REDUCE in Niecza::Grammar?
04:35 kst joined #perl6
04:38 pragma_ nazi::grammar
04:38 ashleyde1 joined #perl6
04:42 ashleyde1 joined #perl6
04:50 MattMan joined #perl6
04:57 cono joined #perl6
05:04 tom_tsuruhara joined #perl6
05:08 drbean joined #perl6
05:09 dalek niecza: 14138d4 | sorear++ | Niecza/Actions.pm:
05:09 dalek niecza: Try harder to return nonzero from the compiler after crashing (...)
05:09 dalek niecza: review: http://github.com/sorear/niecza/commit/14138d4297148a3bbe4844c9ee860fd14f28ebac
05:09 dalek niecza: 4f89f0b | sorear++ |  (2 files):
05:09 dalek niecza: Use inline code expansions for quantifiers
05:09 dalek niecza: Suprisingly, even without lexical let working, this is -20K to test bytecode.
05:09 dalek niecza: review: http://github.com/sorear/niecza/commit/4f89f0b047200e05dde56326dbc02a6e02ae1b2e
05:18 envi^home joined #perl6
05:36 ingy joined #perl6
05:37 Axius joined #perl6
05:40 Axius joined #perl6
05:43 kst joined #perl6
05:44 ingy star: say "FOO".lc
05:44 p6eval star 2010.07: OUTPUT«foo␤»
05:59 Axius joined #perl6
06:01 pugssvn r32000 | pmichaud++ | [t/spec]:  *..* is no longer a valid Range, per S02.
06:06 dalek rakudo: 8455499 | pmichaud++ |  (17 files):
06:06 dalek rakudo: Merge branch 'master' into range
06:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8455499d4e6494bf09ff4d0377cb6d4ef90121a7
06:06 dalek rakudo: e8f2c6b | pmichaud++ | src/core/Range (2 files):
06:06 dalek rakudo: A few more Range updates for Whatever, .from, .to, .bounds.
06:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e8f2c6b00fde86f1b7bbe47a5538eac277d47ca4
06:06 dalek rakudo: 3f202d5 | pmichaud++ | src/core/ (3 files):
06:06 dalek rakudo: More range improvements.  All spectests pass.
06:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3f202d57120e748b553ef1241eb7debba58e415d
06:06 dalek rakudo: 6be4293 | pmichaud++ | src/core/Range.pm:
06:06 dalek rakudo: No longer need separate checks for +/- Inf in Range.
06:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6be4293980dab7b731d5ec754b5f5f3c57ebcb2f
06:19 whiteknight joined #perl6
06:25 whiteknight what are the current best practices for making a new module for rakudo?
06:26 MattMan joined #perl6
06:26 whiteknight is there a current module builder tool?
06:28 diakopter there are modules?
06:30 whiteknight i dont know what they are called
06:30 sorear modules.perl6.org?
06:31 whiteknight is proto the current package manager?
06:35 sorear it's either proto, pls, or ufo
06:40 dalek niecza: eaf583b | sorear++ | CodeGen.pm:
06:40 dalek niecza: Allow inline type information in the style of pir::weirdop__PSS
06:40 dalek niecza: review: http://github.com/sorear/niecza/commit/eaf583bc936fd49428d8017d9a046ddd942f3782
06:40 dalek niecza: 0c64692 | sorear++ | CompilerDriver.pm:
06:40 dalek niecza: Fix small bug where Foo.dll would be linked against Foo.dll
06:40 dalek niecza: review: http://github.com/sorear/niecza/commit/0c64692ee2c8dcc802b1aca937152661f1ebfd91
06:40 dalek niecza: 38b3ab2 | sorear++ |  (3 files):
06:40 dalek niecza: Add multithreading support
06:40 dalek niecza: review: http://github.com/sorear/niecza/commit/38b3ab29cfc96ca46bbf2abecd0a8c9208c9ebfe
06:46 kst joined #perl6
06:49 ingy greetings
06:50 sorear sadly, my lazy lists are not threadsafe, so hyperops are probably a no go
06:50 sorear also STD.pm6 doesn't seem to honor is export on class definitions (?)
06:50 whiteknight what's an optional param, $foo?
06:50 sorear yes
06:51 sorear (hinthinthint: niecza is now probably the first Perl6 implementation with multithreading capability)
06:52 whiteknight does new() not support optional parameters?
06:53 sorear new() is a completely ordinary class method
06:54 sorear (in particular, it doesn't magically create an object; if you override new, you need to call my $obj = self.CREATE; return $obj; yourslef
06:54 sorear )
06:57 jhuni joined #perl6
06:57 sorear don't expect much love on Threads.pm6 from me, though
06:57 sorear with my 1 CPU I don't plan to dogfood it often
06:58 sorear (yes, it predates HyperThreading)
06:59 dalek niecza: 5b8140e | sorear++ | Threads.pm6:
06:59 dalek niecza: Fudge Thread & Monitor to be correctly exported
06:59 dalek niecza: review: http://github.com/sorear/niecza/commit/5b8140e44d7f5e0ee70278c5a31959f3793346ca
06:59 ingy star: my $a = ['x', 'y', 'z']; say join("\n", $a)
06:59 p6eval star 2010.07: OUTPUT«x y z␤»
06:59 ingy star: my $a = ['x', 'y', 'z']; say $a.join("\n")
06:59 p6eval star 2010.07: OUTPUT«x␤y␤z␤»
07:00 ingy star: my $a = ['x', 'y', 'z']; say ($a, '').join("\n")
07:00 p6eval star 2010.07: OUTPUT«x y z␤␤»
07:00 ingy star: my $a = ['x', 'y', 'z']; say (|$a, '').join("\n")
07:00 p6eval star 2010.07: OUTPUT«Capture()<0x4baf9f0>␤␤»
07:00 ingy star: my $a = ['x', 'y', 'z']; say (@$a, '').join("\n")
07:01 p6eval star 2010.07: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "@$a, '').j"␤»
07:01 ingy how do I do the p6 equiv of join("\n", @$a, '')
07:04 whiteknight when I try to pass an optional parameter to my new() method, I get a Null PMC in invoke() error
07:15 ingy star: say "abc".length
07:15 p6eval star 2010.07: OUTPUT«Method 'length' not found for invocant of class 'Str'␤  in main program body at line 22:/tmp/O0w65cRM3N␤»
07:15 ingy star: say length("abc")
07:15 p6eval star 2010.07: OUTPUT«Could not find sub &length␤  in main program body at line 22:/tmp/MtXJaJc_bD␤»
07:15 ingy star: say len("abc")
07:15 p6eval star 2010.07: OUTPUT«Could not find sub &len␤  in main program body at line 22:/tmp/P8BHVY9md9␤»
07:15 Tene whiteknight: nopaste?
07:15 ingy star: say "abc".len
07:15 p6eval star 2010.07: OUTPUT«Method 'len' not found for invocant of class 'Str'␤  in main program body at line 22:/tmp/I2vhAFhJay␤»
07:15 whiteknight Tene: I did a git --reset and the problem went away
07:16 Tene Heh.
07:17 * tylercurtis has been reading the Traits papers too much.
07:17 pragma_ I use subversion and I avoid these problems.
07:17 ingy star: say "abc".chars
07:17 p6eval star 2010.07: OUTPUT«3␤»
07:18 tylercurtis When sorear said "... return $obj; yourslef" I thought "wait... Perl 6 has cascades and yourself?" for a moment.
07:19 tylercurtis That's probably a sign I should sleep. G'night/morning #perl6!
07:19 ingy star: say "abc".chars.Bool
07:19 p6eval star 2010.07: OUTPUT«1␤»
07:19 ingy star: say "abc".chars.Bool.Str
07:19 p6eval star 2010.07: OUTPUT«Bool::True␤»
07:19 isBEKaml joined #perl6
07:20 ingy star: say "abc".chars.Bool.Int
07:20 p6eval star 2010.07: OUTPUT«1␤»
07:21 ingy star: say Bool::False.Bool
07:21 p6eval star 2010.07: OUTPUT«0␤»
07:21 ingy star: say Bool::False.Bool.Str
07:21 p6eval star 2010.07: OUTPUT«Bool::False␤»
07:31 ingy star: say 1 ^ 1
07:31 p6eval star 2010.07: OUTPUT«one(1, 1)␤»
07:31 ingy star: say 1 ^^ 1
07:31 p6eval star 2010.07: OUTPUT«␤»
07:31 ingy star: say 1 ^^ 0
07:31 p6eval star 2010.07: OUTPUT«1␤»
07:31 ingy star: say 0 ^^ 0
07:31 p6eval star 2010.07: OUTPUT«0␤»
07:31 Axius joined #perl6
07:31 ingy star: say 0 ^^ 1
07:31 p6eval star 2010.07: OUTPUT«1␤»
07:31 ingy star: say 1 ^^ 1
07:31 p6eval star 2010.07: OUTPUT«␤»
07:32 ingy I think that's a bug
07:32 ingy star: say (1 ^^ 1) == (0 ^^0)
07:32 p6eval star 2010.07: OUTPUT«Method 'HOW' not found for invocant of class 'Undef'␤  in main program body at line 1␤»
07:32 ingy star: say (1 ^^ 1) == (0 ^^ 0)
07:32 p6eval star 2010.07: OUTPUT«Method 'HOW' not found for invocant of class 'Undef'␤  in main program body at line 1␤»
07:32 ingy star: say (1 ^^ 1).Bool
07:32 p6eval star 2010.07: OUTPUT«Method 'Bool' not found for invocant of class 'Undef'␤  in main program body at line 22:/tmp/Ajd_iKitH8␤»
07:33 ingy star: say (0 ^^ 0).Bool
07:33 sorear lookig for something?
07:33 p6eval star 2010.07: OUTPUT«0␤»
07:33 ingy sorear: me?
07:33 sorear yes
07:33 ingy just noting rakudo bugs
07:34 sorear p6eval is not a rt bot
07:34 ingy I didn't say it was
07:34 sorear you're embedding bug reports in a long dialog
07:35 sorear if you're expecting someone to report them for you...
07:35 ingy am I doing something wrong?
07:35 ingy I was just playing with p6eval
07:36 ingy I can stop if it's bugging you
07:36 Axius_ joined #perl6
07:37 ingy star: say "ok" unless (1 ^^ 1)
07:37 p6eval star 2010.07: OUTPUT«ok␤»
07:38 ingy star: say (1 ^^ 1) ?? "foo" !! "bar"
07:38 p6eval star 2010.07: OUTPUT«bar␤»
07:40 kst joined #perl6
07:41 Guest23195 joined #perl6
07:43 szabgab rakudo: sub f($a?) { $a //= 42 }; f(2);
07:43 p6eval rakudo 6be429: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in 'f' at line 22:/tmp/GpjYOMVgtf␤  in main program body at line 22:/tmp/GpjYOMVgtf␤»
07:43 szabgab I am just wondering if this should not stay alive as there is no eral assignment needed?
07:43 szabgab s/eral/real/
07:45 ingy star: say index("Cat in hat", "hat")
07:45 p6eval star 2010.07: OUTPUT«7␤»
07:46 ingy star: say "Cat in hat".index("hat")
07:46 p6eval star 2010.07: OUTPUT«7␤»
07:49 * ingy prays for a green bar...
07:50 ingy All tests successful.
07:50 ingy Files=9, Tests=47, 118 wallclock secs ( 0.06 usr  0.04 sys + 112.60 cusr  5.13 csys = 117.83 CPU)
07:51 ingy thank you, god...
07:51 ingy wow, less than 2 minutes to run a small test suite
07:51 ingy frickin ossum!!!
07:52 sorear rakudo, or worse?
07:53 ingy rakudo star
07:54 Axius joined #perl6
07:54 * ingy swears off of perl 6 development for a few days...
07:57 * ingy actually wrote a kickass Perl 5 module today. A Moose substitute if you will.
07:58 ingy http://search.cpan.org/~ingy/Gloom-0.11/lib/Gloom/Doc.pm
08:01 Axius joined #perl6
08:05 wamba joined #perl6
08:10 Tene ingy: That might be useful for me.  I've been tempted to write something approximately like that at work for a while now.
08:14 Axius joined #perl6
08:21 fod joined #perl6
08:27 Axius joined #perl6
08:38 kst joined #perl6
08:39 finanalyst joined #perl6
08:53 finanalyst pmichaud: ping
08:53 finanalyst moritz_: ping
08:54 moritz_ finanalyst: pong
08:54 finanalyst moritz_: good morning
08:55 finanalyst moritz_: i am looking at pls, as you suggested.
08:55 molaf joined #perl6
08:56 finanalyst moritz_: it seems rakudo automatically includes ~/.perl/lib in @*INC but not ./lib
08:56 moritz_ that's correct
08:56 finanalyst moritz_: is there any reason for this?
08:56 moritz_ rakudo: say @*INC.perl
08:56 p6eval rakudo 6be429: OUTPUT«["lib", "/home/p6eval/.perl6/lib", "/home/p6eval//p2/lib/parrot/2.6.0-devel/languages/perl6/lib", "."]␤»
08:57 ingy Tene: try it. it's dead simple.
08:57 moritz_ huh, this one does include lib :-)
08:57 moritz_ finanalyst: the desire that a program should run the same everywhere
08:57 moritz_ the '.' at the end is only a stop-gap solution, and will be removed at some point
08:58 moritz_ needed for Test.pm
08:58 ingy Tene: it's just clever packaging of code that I've been using in most of my modules for many years.
08:58 finanalyst moritz_: in the proto README it indicates that "good" modules will have a ./lib directory
08:58 sorear finanalyst: perl5 doesn't include lib in @INC either
08:58 sorear finanalyst: perl5 people are expected to use -Ilib
08:59 sorear and the -l option to prove, which passes -Ilib
08:59 finanalyst so what can be assumed about an environment?
08:59 moritz_ finanalyst: yes, and a good module will be installed before use
08:59 finanalyst if pls is downloaded, it uses modules in ./lib
08:59 moritz_ that's a very broad question; care to phrase it less general?
08:59 finanalyst but running it gets an error
09:00 moritz_ if I were masak, I'd manipulate @*INC inside the program
09:00 moritz_ but he doesn't like doing that, it seems :-)
09:01 moritz_ I guess the idea is to install pls too
09:01 finanalyst would it be a "bad" idea for rakudo to have './lib' in the rakudo default?
09:01 moritz_ for example bundled with the next R* release
09:01 moritz_ I don't know if it's bad, but it's certainly not the solution we are looking for
09:03 finanalyst btw there are several environment variables do not appear to be working (i git pulled rakudo a couple of days ago), like $*CWD and %*ENV
09:03 finanalyst any special reason for this?
09:04 moritz_ $*CWD is simply not yet implemented
09:04 moritz_ (and I think it's the wrong API anyway)
09:04 moritz_ %*ENV suffers from some parrot limitations
09:05 isBEKaml finanalyst: can you tell me what error you get when running pls?
09:05 masak joined #perl6
09:05 masak oh hai, #perl6!
09:05 moritz_ having the current working directory in a dynamic variable seems oh-so-wrong
09:05 isBEKaml AFAICS, pls generates a makefile that utilises the lib folder of the module to be installed.
09:05 finanalyst isBEKaml: cant find App:pls
09:06 moritz_ because the current working directory is really a process wide property
09:06 finanalyst masak: good localtime
09:06 moritz_ whereas $*CWD is tied to a scope
09:06 moritz_ so things like
09:06 masak finanalyst: are you attempting to run proof-of-concept?
09:06 isBEKaml hi masak! :)
09:06 masak finanalyst: then you need to set PERL6LIB=`pwd`/lib
09:06 finanalyst masak: just started working on pls . yes proof-of-concept
09:07 moritz_ my @a := gather { for 1..3 {  my $*CWD = '/tmp/'; take $_ } }; # access items of @a here
09:07 masak finanalyst: that goes for all non-installed projects with a lib/ dir, by the way.
09:07 moritz_ would have to jump back and forth, tied to control flow
09:07 finanalyst masak: i though putting BEGIN { @*INC.push './lib'} ;# at start of pls
09:08 masak finanalyst: please don't.
09:08 finanalyst masak: why?
09:08 masak finanalyst: eventually, we want people to install pls instead.
09:09 masak finanalyst: what you're proposing is a crutch in the code for the developers.
09:09 masak finanalyst: I'd much prefer that the developers suffer a bit, and find ways to make their development environment efficient.
09:09 finanalyst \a nod
09:09 * masak adds an alias for export PERL6LIB=`pwd`/lib on his box
09:10 finanalyst masak: to make it easier for first timers, maybe an install-pls script?
09:10 isBEKaml finanalyst: fwiw, I haven't had that problem when I ran poc last night. and my p6lib contains only ~/.perl6/lib and the parrot lib path.
09:10 moritz_ is it intentional that ufo's Makefile installs the .pir files in blib/lib instead of just blib/ ?
09:11 masak moritz_: I was surprised the first time I saw that too.
09:11 masak moritz_: I don't know. gotta ask ingy.
09:11 moritz_ masak: I think that 'make' should also copy the .pm file to blib/, otherwise you need both blib/ and lib/ iin PERL6LIB
09:11 moritz_ ingy: see above
09:12 isBEKaml masak: yes, I was surprised about that one too. I saw that last night when I tried building yapsi.
09:12 masak moritz_: aye, probably. fwiw, I haven't been able to get PERL6LIB to work with a blib setup yet.
09:13 isBEKaml masak: now that yapsi needs rakudo, we need both the .pm amd .pir to be installed into PERL6LIB.
09:13 masak moritz_: maybe copying the .pm files is what's missing.
09:13 moritz_ masak: probably; export PERL6LIB=blib/lib:lib works
09:13 moritz_ "works"
09:13 masak yeah, that's what I've ended up doing.
09:13 moritz_ masak: btw is it intentional that proof-of-concept doesn't install dependencies first?
09:13 moritz_ or is that just NYI?
09:14 masak would someone be so kind as to volunteer to make a patch that copies the .pm files into blib?
09:14 masak moritz_: it doesn't?
09:14 moritz_ masak: it doesn't.
09:14 isBEKaml moritz_: huh?
09:14 masak moritz_: do you have an example?
09:14 isBEKaml moritz_: can you give some module that fails in its dependencies?
09:14 masak I mean... installing dependencies is in the *core* of pls.
09:14 masak it's not supposed to fail. ever.
09:14 moritz_ I jst tried to install Math-Model
09:15 * masak tries that
09:15 * isBEKaml too
09:15 moritz_ http://nopaste.snit.ch/22798
09:15 moritz_ hm, I have some of the deps in ~/.perl6/lib/ already
09:16 masak try clearing out cache/ and poc-projects.state
09:16 moritz_ it's LTA that the log file does not exist
09:16 masak yeah, that should Never Happen either. but I can see why that one does.
09:17 moritz_ with cleared cache and .state, I still get the same output
09:17 masak it's very encouraging that there's a sudden interest around pls. I'm happy about that. but I will spend today with Buf and pack/unpack, if you don't mind. :)
09:17 * moritz_ tries again with cleared .perl6/lib/
09:18 * moritz_ would like to see masak's GSOC project finished :-)
09:18 isBEKaml masak: good luck. When's the hard-pencils-down?
09:18 masak tomorrow.
09:18 masak (and thanks)
09:19 masak it's looking good, but I need much of today to have something I can call finished.
09:19 isBEKaml :)
09:19 masak moritz_: fwiw, pls doesn't seem to install dependencies here either. :/
09:19 masak will investigate... some other time.
09:19 sorear masak: niecza has protoregexes now.
09:20 masak sorear: awesome.
09:20 * sorear is on an optimizing binge now
09:20 masak moritz_: hah! a funny thought struck me. I don't remember writing any deps.proto logic for pls. it's probably the case that the tests do dependencies, but proof-of-concept doesn't. :)
09:20 isBEKaml sorear: Festival shopping? :)
09:22 sorear mm?
09:24 jfried joined #perl6
09:29 isBEKaml sorear: poor joke. never mind. :)
09:30 isBEKaml rakudo: role Foo { method foo { say "role"; }; }; class FooClass does Foo { method build { say "class"; }; }; FooClass.new();
09:30 p6eval rakudo 6be429:  ( no output )
09:30 isBEKaml rakudo: role Foo { method foo { say "role"; }; }; class FooClass does Foo { method build { say "class"; }; }; FooClass.build();
09:30 p6eval rakudo 6be429: OUTPUT«class␤»
09:31 isBEKaml rakudo: role Foo { method foo { say "role"; }; }; class FooClass does Foo { method build { say "class"; }; }; FooClass.new.build();
09:31 p6eval rakudo 6be429: OUTPUT«class␤»
09:31 masak isBEKaml: you never call .foo
09:31 isBEKaml is there any chaining order for methods in the role and class thats share the same name?
09:31 isBEKaml blah!
09:31 masak isBEKaml: class methods override role methods.
09:31 isBEKaml masak: you're right!
09:31 isBEKaml rakudo: role Foo { method foo { say "role"; }; }; class FooClass does Foo { method foo { say "class"; }; }; FooClass.new.build();
09:32 p6eval rakudo 6be429: OUTPUT«Method 'build' not found for invocant of class 'FooClass'␤  in main program body at line 22:/tmp/7sBuUsiaAJ␤»
09:32 isBEKaml rakudo: role Foo { method foo { say "role"; }; }; class FooClass does Foo { method foo { say "class"; }; }; FooClass.new.foo();
09:32 p6eval rakudo 6be429: OUTPUT«class␤»
09:32 masak isBEKaml: class methods override role methods.
09:32 isBEKaml masak: yes, right.
09:33 Tene rakudo: role Foo { method foo { say "role"; }; }; class FooClass does Foo { method foo { say "class"; }; }; FooClass.new.*foo();
09:33 p6eval rakudo 6be429: OUTPUT«class␤»
09:33 Tene Just curious.
09:33 masak they don't stack on top of them, IIUC. they actually push them out.
09:34 masak rakudo: role Foo { method foo { say "role"; }; }; class FooClass does Foo { method foo { say "class"; self.Foo::foo }; }; FooClass.new.foo
09:34 p6eval rakudo 6be429: OUTPUT«class␤role␤»
09:34 isBEKaml callsame?
09:34 isBEKaml rakudo: role Foo { method foo { say "role"; }; }; class FooClass does Foo { method foo { callsame; say "class"; }; }; FooClass.new.foo();
09:35 p6eval rakudo 6be429: OUTPUT«class␤»
09:35 masak isBEKaml: well, no. since they're replaced, not hidden.
09:35 masak isBEKaml: what's important to realize, I think, is that roles aren't part of the class hierarchy.
09:35 masak isBEKaml: there's no MRO with roles.
09:35 masak in fact, roles are the antithesis of all that.
09:35 kst joined #perl6
09:36 isBEKaml masak: I just find it a bit odd that classes can mixin roles without any MROs for methods that share the same name.
09:36 masak isBEKaml: that's what roles do.
09:37 isBEKaml masak: plainly pushing out role's methods in broad "code"light. :)
09:37 masak (slight terminology nit: classes don't mix in roles, objects do. classes just "do" roles.)
09:37 isBEKaml masak: noted.
09:38 masak anyway, the underlying reason is this: consider a number of roles being done by a single class. let's say there are no methods in the class hiding the role methods.
09:39 masak now, when there's a collision between the methods of two roles, you get a compile-time error.
09:39 masak that's what makes roles awesome.
09:39 isBEKaml Roles are the fringe guys! Can I call them waterboys? :)
09:40 masak to silence that error, you're supposed to put a method in the class that decides what to do. it might call one method, call the other, or do something more fancy.
09:40 masak so putting a method in the class actually indicates that you know what you're doing (overriding the conflicting role methods)
09:42 isBEKaml rakudo: role Foo { method foo { say "FooRole"; }; }; role Bar { method foo { say "BarRole"; }; }; class FooClass does Foo does Bar { method foo { say "clazz"; }; }; FooClass.new.foo; # trying them out
09:42 p6eval rakudo 6be429: OUTPUT«clazz␤»
09:43 isBEKaml rakudo: role Foo { method foo { say "FooRole"; }; }; role Bar { method foo { say "BarRole"; }; }; class FooClass does Foo does Bar { method foo1 { say "clazz"; }; }; FooClass.new.foo1; # trying them out
09:43 p6eval rakudo 6be429: OUTPUT«===SORRY!===␤Method 'foo' collides and a resolution must be provided by the class␤»
09:43 masak \o/
09:43 isBEKaml masak++
09:43 masak jnthn++
09:44 isBEKaml this is what is MRO? or just method chaining the hierarchy? :P
09:44 isBEKaml (I upvoted you, you did jnthn++) :P
09:45 masak MRO has nothing to do with roles, but is the mechanism for choosing methods in a class hierarchy.
09:45 isBEKaml (I wasn't speaking technical when I said MRO)
09:45 masak class A { method foo() }; class B is A { method foo() }; class C is A { method foo() }; class D is B is C {}; C.new.foo; # which method gets called?
09:46 masak isBEKaml: ah, a joke. I see.
09:46 masak isBEKaml: no, that was more like method delegation... :)
09:46 masak which is different, since it involves several method calls.
09:46 isBEKaml masak: for your poser, I'd guess A.
09:47 masak isBEKaml: I believe the answer (under C3 MRO) is B.
09:47 isBEKaml masak: no, C is A , C and then A does it.
09:47 masak rakudo: class A { method foo { say "A" } }; class B is A { method foo { say "B" } }; class C is A { method foo { say "C" } }; class D is B is C {}; C.new.foo
09:47 p6eval rakudo 6be429: OUTPUT«C␤»
09:48 masak isBEKaml: seems you were more right. :)
09:48 masak isBEKaml: but only one method is called, unless I do .*foo or .+foo
09:49 isBEKaml rakudo: class A { method foo { say "A" } }; class B is A { method foo { say "B" } }; class C is A { method foo {say "C" } }; class D is B is C {}; C.new.*foo
09:49 p6eval rakudo 6be429: OUTPUT«C␤A␤»
09:49 isBEKaml \o/
09:50 isBEKaml masak: I plainly took a guess from whatever I knew of java. class hierarchies play by calling through the method chain in case of overridden methods.
09:50 isBEKaml rakudo: class A { method foo { say "A" } }; class B is A { method foo { say "B" } }; class C is A { method foo {say "C" } }; class D is B is C {}; C.new.+foo
09:50 p6eval rakudo 6be429: OUTPUT«C␤A␤»
09:51 masak .*foo and .+foo work the same, but the latter expects at least one method, or it'll fail.
09:51 masak s/fail/die/
09:51 isBEKaml rakudo: class A { method foo { say "A" } }; class B is A { method foo { say "B" } }; class C is A { method foo {say "C" } }; class D is B is C {}; D.new.+foo
09:51 p6eval rakudo 6be429: OUTPUT«B␤C␤A␤»
09:52 isBEKaml masak: akin to * and + in regexes?
09:53 isBEKaml masak: btw, shouldn't you be working on your GSoC now? (I sometimes find IRC to be too much of a distraction :D)
09:54 masak isBEKaml: yes, akin to * and + in regexes.
09:54 masak isBEKaml: what makes you think I'm not? :) but you have a point.
09:54 isBEKaml masak: Go ahead. :)
09:58 TiMBuS std: (state => 'a').perl.say
09:58 p6eval std 31912: OUTPUT«ok 00:01 113m␤»
09:58 TiMBuS rakudo: (state => 'a').perl.say
09:58 p6eval rakudo 6be429: OUTPUT«===SORRY!===␤Malformed state at line 22, near "=> 'a').pe"␤»
09:58 Tene also .?foo, fwiw
09:59 masak TiMBuS: just quote 'state' and you'll be fine for now.
09:59 masak TiMBuS: it's a known rakudobug.
09:59 masak Tene: yes. .?foo is to .foo what .*foo is to .+foo
10:00 Tene masak: the regex comparison extends to .?foo too
10:00 masak aye.
10:00 TiMBuS ok then masak. wasnt sure if it was a rakudobug or a perl6 thing
10:00 masak do we have those (?*+) in some other place of the language, besides regexes and method call modifiers?
10:01 masak &pack has * :)
10:02 Tene we have $*foo and $?foo, but not $+foo, and they don't have regex-like meanings.
10:02 masak we used to have $+foo. and no, I don't count those :)
10:02 Tene sigs use $foo? and *@foo, which are kind of similar
10:02 Tene I don't remember $+foo
10:03 masak I think $*foo used to be globals and $+foo was contextuals.
10:03 Tene I've seen people want a *@foo that always matched at least one item, so there's an argument to be made for adding +@foo in sigs
10:03 masak they merged into $*foo being contextuals.
10:03 masak Tene: that's a nice idea.
10:03 masak Tene: on the other hand, empty list already trumps *@foo, so you kind of get that behaviour for free.
10:04 Tene masak: you mean, add a multi sig with an empty list there?
10:04 masak aye.
10:04 Tene 'k
10:05 masak Tene: that was decuded at YAPC::EU 2009.
10:05 Tene I like that.
10:06 masak s/cud/dic/
10:06 masak ergbhfl.
10:06 masak s/dic/cid/ :)
10:06 finanalyst left #perl6
10:08 tadzik joined #perl6
10:08 tadzik o/
10:10 masak \o
10:12 masak news of Rakudo Star in Castellano. nice. http://www.programacion.com/noticia/lanzamiento_de_rakudo_star_una_version_de_perl_6_1850
10:13 masak maybe we'll see more Castillian programmers here in a while.
10:18 proclus joined #perl6
10:19 moritz_ that would be nice
10:22 masak ¡guay!
10:24 risou joined #perl6
10:27 kst joined #perl6
10:31 Trashlord joined #perl6
10:33 barney joined #perl6
10:38 masak yay! .encoding now does latin-1
10:38 masak (locally)
10:39 masak where do you guys stand on allowing more than just 'iso-8859-1' as the $encoding parameter?
10:39 masak things like 'ISO-8859-1' and 'latin-1' won't ever be used for something else. is this a case where synonyms might be a good thing?
10:40 masak same question about 'utf-8', 'UTF-8' and 'utf8'.
10:41 arnsholt There's an RFC somewhere which lists synonyms for encodings. I think at least allowing some of the synonyms there for utf-8 and latin-1 might be nice
10:42 masak doing 'latin-1' => 'iso-8859-1' for now. and treating everything case-insensitively.
10:44 moritz_ +1
10:44 moritz_ is there a case where removing dashes could cause name clashes?
10:44 moritz_ or at least the first dash?
10:45 masak dunno.
10:45 masak but I don't want to put too much magic in there from the start.
10:45 masak better to begin conservatively and see where people trip up.
10:46 masak good docs are probably worth much more in this case.
10:47 * masak ♥ Perl 6
10:47 masak die "Unknown encoding $encoding" unless $encoding.lc eq any @KNOWN_ENCODINGS;
10:53 * moritz_ pushes ufo patch
10:53 moritz_ hope I resolved the merge conflict correctly :/
10:54 tadzik rakudo: (1..100).pick for(1..100)
10:54 avuserow joined #perl6
10:54 p6eval rakudo 6be429:  ( no output )
10:54 tadzik segmentation fault here
10:55 tadzik rakudo: (1..100).pick for(1..100); say 'alive';
10:55 p6eval rakudo 6be429: OUTPUT«alive␤»
10:55 tadzik oh you
10:55 tadzik oh, not this rakudo
10:55 tadzik tadzik--
10:56 szabgab mb
10:57 szabgab wrong window and wrong command
10:57 masak szabgab: but we're happy to have you here :)
10:57 masak hugme: hug szabgab
10:57 * hugme hugs szabgab
10:57 szabgab anyway, just finished 4 hours of screencast creating, result : 10 min
10:57 masak \o/
10:57 masak szabgab++
10:58 tadzik masak: you stole my reaction
10:58 tadzik szabgab++\
10:58 tadzik \o/
10:58 * masak watches the screencast: http://szabgab.com/blog/2010/08/perl6-subroutines-and-home-made-operators.html
10:59 tadzik sounds tempting
10:59 tadzik but it's not on the list
11:01 tadzik awesome intro :)
11:03 masak indeed.
11:03 masak are the screencasts linked from perl6.org yet?
11:04 szabgab masak: yes
11:04 masak good.
11:05 avuserow joined #perl6
11:08 masak TimToady: loose thought: if Nil gets split into one defined and one undefined form, and thus @a and %h can suddenly be set to be undefined, maybe it's time to make unpassed array and hash parameters undefined? :)
11:11 avuserow joined #perl6
11:13 * masak agrees with Whiteknight in http://wknight8111.blogspot.com/2010/01/problem-with-pir.html
11:14 patcat88 joined #perl6
11:17 jnthn afternoon, 6folk
11:17 masak jnthn! \o/
11:18 jnthn masak!
11:18 Trashlord hey dudes
11:18 masak Trashlord! \o/
11:18 Trashlord how's it going, masak?
11:18 Trashlord hey, you're from sweden, right?
11:18 masak aye.
11:18 Trashlord cool
11:18 masak :)
11:19 Trashlord I'm going to move to Finland within the next 6 months
11:19 Trashlord got family there
11:19 masak Trashlord: nice! we could visit each other.
11:19 Trashlord so we'll be a lot closer to each other ;p
11:19 Trashlord yeah
11:19 masak \o/
11:19 masak ok, going down for lunch and software updates. see you on the other side. :)
11:19 masak jnthn: Str.encode now does different encodings :)
11:20 avuserow joined #perl6
11:22 jnthn mantovani: yay!
11:22 jnthn masak++
11:22 jnthn Trashlord: Ooh, where in Findland?
11:22 jnthn er, Finland :-)
11:22 * jnthn goes to make coffee so he can type properly :-)
11:23 Trashlord haha
11:23 Trashlord well
11:23 Trashlord I have family in Vantaa
11:23 Trashlord and Lovissa
11:23 Trashlord and friends in Helsinki
11:23 jnthn I've only ever been in Helsinki. But I liked it. :-)
11:23 Trashlord last time I was there was 8 years ago, when I was 13
11:24 Trashlord I remember going to Linanmakki, which is a big theme park
11:24 Trashlord I was also in the northern area of Finland, totally awesome
11:24 Trashlord fishing at 2am, the sun still hasn't totally set
11:24 Trashlord so amazing
11:25 redicaps joined #perl6
11:25 jnthn Yeah, I don't get midnight sun here, sadly, but in the middle of summer it only got dark for a couple of hours, if that.
11:26 Trashlord I think Finland will provide awesome opportunities for personal growth, for me
11:26 jnthn (I'm in the very south of Sweden, so quite a way from the arctic circle).
11:26 Trashlord ah
11:26 szabgab all this talk about artic circle
11:27 Trashlord My aunt says I can study in a university, scholarship from the government
11:27 szabgab I have 38C in my room
11:27 Trashlord if that's true, I will complete my high school education, and then move on hopefully to computer science
11:27 Trashlord yes, I'm 21, and I'm a high school drop out, at this point, living in a little village in the mountains of northern Israel
11:29 jnthn szabgab: Ouch!!!
11:30 jnthn Trashlord: Sounds like nice plans. :-)
11:32 Trashlord yeah ;p
11:32 Trashlord I can't wait to camp out in a forest, middle of nowhere
11:32 Trashlord or go to a trance party in some forest
11:38 avuserow joined #perl6
11:39 redicaps left #perl6
11:50 pmurias joined #perl6
11:50 pmurias ruoso: hi
11:58 masak joined #perl6
11:58 masak \o/
12:05 masak hm, next week is release week, innit?
12:05 tadzik today's the the of the Parrot release, isntit?
12:05 isBEKaml 6Compiler, 2Star, innit? :)
12:05 masak tadzik: no, Parrot releases are on Tuesdays.
12:06 tadzik oh
12:06 tadzik right
12:06 masak second of the month, to be exact.
12:06 tadzik ehm, counting from 0?
12:06 isBEKaml always the third tuesday.
12:07 masak meybe it's the third.
12:07 masak jnthn: we should go visit Trashlord in Finland and have a hackathon there :)
12:08 jnthn masak: \o/
12:08 jnthn masak: I wonder how many projects we could finnish on that trip...
12:09 isBEKaml great! _Finnish_ as much as possible! :)
12:10 * isBEKaml tries reading parrot docs
12:12 masak jnthn: you're punbearable.
12:13 * jnthn stops before he gets punished
12:14 masak fsvo 'stops' :)
12:17 * jnthn distracts himself with implemented named args
12:17 jnthn *implementing
12:17 azert0x joined #perl6
12:19 whiteknight joined #perl6
12:20 dalek rakudo: 10041cb | (Solomon Foster)++ | src/core/ (2 files):
12:20 dalek rakudo: Implement infix:�<=>�(Num, Num),  infix:�cmp�(Num, Num), and
12:20 dalek rakudo: infix:�<=>�(Int, Int) along the model of the previous infix:�cmp�(Int, Int).
12:20 dalek rakudo: On the plus side, this knocks about 10% off the execution time of Range
12:20 dalek rakudo: iteration on Nums.  (It's still mysteriously about 50% slower than Range
12:20 dalek rakudo: iteration on Ints.)  On the minus side, all of these functions are violating the
12:20 dalek rakudo: spec by not using the Order enum.
12:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/10041cb050a81f463020400d897e70d55ebb65d1
12:20 masak bah. spec, schmeck.
12:20 masak colomon++
12:24 kst joined #perl6
12:27 isBEKaml_ joined #perl6
12:37 masak szabgab: at http://szabgab.com/perl6.html, "Next Perl 6 training" is out-of-date.
12:37 masak szabgab: by the way, in the end I didn't stop by that training session. I hope it went well.
12:42 molaf joined #perl6
12:43 szabgab masak: I noticed you were not there :)
12:43 masak :)
12:43 * masak was in Firenze
12:43 szabgab TimToady and pmichaud were the trouble makers this time :)
12:43 masak oh, good.
12:43 moritz_ how many "real" attendends were there?
12:44 szabgab 1.5 :)
12:44 masak how many of these were half attendees, and why? :)
12:45 szabgab szbalint was the 0.5 as he came in only after lunch
12:45 masak ah. szbalint+
12:45 moritz_ lol
12:46 drbean joined #perl6
12:46 szabgab the viewer stats of the screencasts are very strange
12:47 Mowah joined #perl6
12:47 szabgab if I take all the time since my first perl 6 cast , then 15% are women
12:47 szabgab if I take the last 10 days then 0.2% are women
12:48 dual joined #perl6
12:49 szabgab between 27/7 - 2/8 that was 22%
12:54 rindolf joined #perl6
12:57 amoe joined #perl6
12:57 masak $Config{intsize} # what's the Perl 6 equivalent of this?
12:58 vpm left #perl6
12:59 amoe left #perl6
13:09 orafu joined #perl6
13:10 masak rakudo: sub foo($a, $b) { say $a; say $b }; foo |(42 xx 2)
13:10 p6eval rakudo 10041c: OUTPUT«42␤42␤»
13:10 * masak sometimes wishes for a listop form of prefix:<|>
13:11 masak C<flatten>, perhaps.
13:11 lithos joined #perl6
13:13 jnthn Not sure how that'd be implemented...
13:15 kst joined #perl6
13:28 tewk joined #perl6
13:30 sftp joined #perl6
13:31 barney joined #perl6
13:33 masak rakudo: sub foo(*@a) { say shift(@a); say @a.perl }; foo(1,2,3)
13:33 p6eval rakudo 10041c: OUTPUT«1␤[2, 3]␤»
13:33 masak shouldn't @a be readonly there?
13:39 moritz_ it is
13:39 pmichaud good morning, #perl6
13:39 moritz_ it's just not immutable
13:39 moritz_ \o pmichaud
13:39 pmichaud masak: see my discussion last night with TimToady
13:40 masak pmichaud: aye, that's surely related.
13:40 masak pmichaud: what did you conclude? :)
13:40 pmichaud basically, iiuc TimToady++ said that mutating @a is erroneous but compilers aren't required to catch it
13:40 masak oh right.
13:40 masak because it might be intractable.
13:41 pmichaud well, more that it might be inefficient
13:41 masak slowtractable.
13:42 masak moritz_: I find it... unsatisfying... to allow readonly things to be mutable.
13:42 pmichaud well, I'm thinking of going ahead and doing the checking in Rakudo
13:44 pmichaud masak: did you see the discussion re: Nil?
13:44 masak yes.
13:45 masak I'm hoping the fallout of this might be that @param? isn't defined when no corresponding argument was passed in.
13:45 pugssvn r32001 | pmurias++ | [mildew] update the -Cgtk backend to Forest::Tree::Viewer::Gtk2
13:46 pmichaud oh, I'm pretty certain Rakudo has that wrong now.
13:46 pmichaud same for    my @param;    # @param should be undefined
13:46 pmurias szabgab: how many viewers did the screencast have?
13:47 masak pmichaud: up until now, they've been defined by spec. :(
13:47 pmichaud they have?
13:47 masak pmichaud: my longest RT ticket is about that.
13:47 masak hold on, I'll get it for you.
13:47 pmichaud please do
13:48 masak pmichaud: http://rt.perl.org/rt3/Ticket/Display.html?id=64928
13:48 masak my conclusion from that discussion was that I'll never be happy about the state of things. now there's a new chance to make things right. :)
13:49 macroron joined #perl6
13:50 pmichaud that discussion is.... weird
13:50 masak it's a bit old, if that's what you mean.
13:50 pmichaud I've been thinking that   "my %h"  initializes %h to be the Hash type object
13:50 pmichaud (thinking recently, at least)
13:50 pmichaud with a WHENCE property that vivifies %h into a true Hash when it's used
13:51 szabgab pmurias: on the first 2 days they get about 200 and then 3-4 / day  (each screencast)   way less than I was hoping for :)
13:51 masak ooh
13:51 pmichaud same for  %h?   as a parameter
13:51 masak \o/
13:51 pmichaud would that solve the problems identified in the ticket?
13:52 masak oh yes, oh yes
13:52 pmichaud (I'm having trouble following the issues there)
13:52 * masak dances
13:52 * masak adds this new development to ticket
13:53 pmichaud but I see that as being somewhat orthogonal to the Nil issue :-)
13:53 pmichaud s/somewhat/mostly/
13:53 masak aye.
13:53 masak pmichaud: did you see my summary of the two problems I have with Nil definedness right now?
13:54 pmichaud masak: sure, I understand that part -- in fact, I somewhat argued the same things in 2009  (unsuccessfully)
13:54 masak oh, ok.
13:54 pmichaud back then, Rakudo was treating Nil as definitely different from an empty Parcel
13:54 masak I can see why you hesitate to switch back to a model like that. :)
13:55 pmichaud (frankly, there was a lot of confusion in my head as to what Nil represented... finally after cornering TimToady++ at YAPC::NA for a while we concluded that Nil was an empty Parcel.  Looks like we were wrong.)
13:55 pmichaud (but I didn't like the definedness of Nil then either :-)
13:55 masak :)
13:56 pmichaud yes, I'm mainly hoping that switching Nil back doesn't end up with huge ramifications for a lot of the other parts of Rakudo.  In the past it always has.
13:56 pmichaud (But I think we'll be okay this time.)
13:56 masak at some point we had Nil( warn "oops, this loop had no elements!" ) too
13:57 pmichaud yeah, that's part of what made me make it type-ish
13:57 masak but that turned into sink ...
13:57 pmichaud I speculated last night that Nil might be an alias for the Parcel type object
13:58 pmichaud rakudo:  say Parcel.list.perl;
13:58 p6eval rakudo 10041c: OUTPUT«()␤»
13:58 pmichaud hmmmmmmmmmmm
13:58 pmichaud rakudo:  say (Nil).list.perl;
13:58 p6eval rakudo 10041c: OUTPUT«()␤»
13:58 pmichaud rakudo:  say (Nil, Nil).list.perl;
13:58 p6eval rakudo 10041c: OUTPUT«((), ())␤»
13:59 pmichaud rakudo:  say (Nil, Nil).flat.perl;
13:59 p6eval rakudo 10041c: OUTPUT«()␤»
13:59 pmichaud rakudo:  say (Parcel, Parcel).flat.perl;
13:59 p6eval rakudo 10041c: OUTPUT«(Parcel, Parcel)␤»
13:59 pmichaud well, it can't be a true alias
13:59 squeeky left #perl6
14:00 TimToady Nil still has to print out as Nil :)
14:00 pmichaud print or .perl?
14:01 TimToady I still suspect Nil is a singleton value more than a type
14:01 pmichaud I'm wondering if it's just a special instance of Parcel
14:01 TimToady could be, but Nil.perl needs to say Nil, not Parcel
14:01 pmichaud sure
14:02 pmichaud maybe Nil is just an empty Parcel with a .defined mixin ?
14:02 TimToady huh?
14:02 TimToady those are both supposed to be undefined now
14:02 pmichaud I meant an empty Parcel instance, not the type object
14:03 TimToady ah
14:03 szabgab I just read the signatures slides of jnthn, very nice but I got lost starting from Zavolaj :)
14:03 pmichaud () but role { method defined() { Bool::False } }
14:05 jnthn You could easily sneak a method Str { 'Nil' } in there too :-)
14:05 pmichaud right
14:05 pmichaud although I suspect Nil may be more along the lines of Failure then
14:05 pmichaud so perhaps  () but Failure
14:05 kst joined #perl6
14:05 jnthn szabgab: I imagine it's easier to follow from there with me explaining it. ;-)
14:07 TimToady I wonder if the new Nil can be used to skip an argument and trigger the default: foo(1,Nil,3)
14:08 pmichaud seems plausible
14:08 TimToady Nil basically being a value that every container refuses to store
14:09 szabgab jnthn: I guess so
14:09 moritz_ what would  say ~(my @a = 1, Nil, 2)  do?
14:09 pmichaud "1 2\n"
14:09 TimToady Nil goes to () in list context
14:10 moritz_ if you can't store Nil in a Parcel, how can you make it trigger a default value in a signature?
14:10 pmichaud you can put Nil in a Parcel
14:10 TimToady well, a parcel is "raw" so can handle them
14:10 pmurias TimToady: what are the kinds of control flow (things that can cause jumps in code) besides conditionals, loops, exceptions and control exceptions
14:10 pmurias ?
14:11 pmurias TimToady: i'm trying to figure out where i need to put the edges in my basic block graph
14:11 TimToady pmurias: lemme think about that in the shower
14:13 masak pmurias: exit
14:13 pmurias TimToady: ok
14:32 * masak just implemented the C S L n N v V directives in &pack
14:32 masak http://github.com/rakudo/rakudo/commit/a98333febf1739a12e5b4b3b1e11e28339d4adbd
14:32 masak time to attack &unpack, methinks.
14:33 JimmyZ joined #perl6
14:33 masak 卓明亮! \o/
14:35 JimmyZ 麦高,下午好
14:35 masak 下午好
14:35 masak 你好吗?
14:36 JimmyZ 还好,最近比较忙,你呢
14:36 masak 好,好
14:36 JimmyZ O(∩_∩)O~
14:37 masak 我还真忙...
14:37 JimmyZ 呵呵,我准备去睡觉了,晚安,明天还要上班
14:38 masak 晚安!
14:46 kst joined #perl6
14:47 pugssvn r32002 | moritz++ | [bench] .gitignore
14:47 dudulz joined #perl6
14:48 jt_ joined #perl6
14:49 jnthn church &
14:51 seungwon joined #perl6
14:52 dual joined #perl6
14:55 TimToady pmurias: I don't think you'll be able to do basic block analysis until you know exactly which language you're parsing, and how it uses lambdas, and have inlined those lambdas that can be inlined.
14:56 TimToady also, I think you'll have to ignore the issue of exceptions, since they're supposed to be exceptional
14:56 TimToady and almost anything could throw an exception
14:56 ruoso joined #perl6
14:56 TimToady also, exceptions themselves aren't control flow, only the stack unwind they might trigger
14:57 TimToady also church &
14:57 masak ignoring 'next', 'redo' and 'last' feels kinda debilitating...
14:58 pmichaud what should be the result of   9/3 cmp 4   ?
14:58 moritz_ rakudo: say 9/3 cmp 4
14:58 pmichaud or, perhaps more interestingly:   90/3 cmp 4
14:58 p6eval rakudo 10041c: OUTPUT«-1␤»
14:58 moritz_ rakudo: say 90/3 cmp 4
14:58 p6eval rakudo 10041c: OUTPUT«1␤»
14:58 moritz_ is this a trick question?
14:58 pmichaud sorta.
14:58 pmichaud is &infix:<cmp> defined for differing types?
14:59 moritz_ I think so
14:59 masak if those types both fall on the real number line, I certainly hope so.
14:59 pmichaud okay, how about this one:
14:59 masak that feels like a small thing to ask.
14:59 TimToady I meant fatal exceptions, not control exceptions, which by definition control control flow :)
14:59 moritz_ it would be kinda un-nice of sort() to die on a list of numbers
14:59 pmichaud rakudo:   say 9/3 cmp 3
14:59 p6eval rakudo 10041c: OUTPUT«0␤»
14:59 pmichaud rakudo:   say 9/3 eqv 3
14:59 p6eval rakudo 10041c: OUTPUT«0␤»
14:59 TimToady &
15:00 moritz_ both seem right to me
15:00 pmichaud ...that tells me that &infix:<cmp> cannot be defined in terms of eqv semantics, as S03 suggests
15:00 masak aye.
15:00 moritz_ scratch S03 then
15:00 masak down with S03!
15:00 pmichaud I'm fine with that.
15:00 moritz_ eqv can only give True or Fals anyway
15:00 pmichaud right
15:00 pmichaud I'm thinking that cmp on Numeric and cmp on String (and cmp on Any)  has little to do with eqv
15:01 moritz_ aye
15:01 pmichaud okay, here's another question.  S03 says that   $a <=> $b   is defined as   +$a cmp +$b
15:02 pmichaud but colomon++ seems to have this completely the other-way-round -- he's defined  cmp in terms of <=>
15:02 pmichaud I think the S03 definition should be the correct one here.
15:02 moritz_ it kinda makes sense to me to define something more complicated in terms of something simpler
15:02 moritz_ ie cmp in terms of <=> and leg
15:03 moritz_ but maybe that's just the weird view of misguided scientist
15:03 pmichaud I have trouble thinking of <=> and leg as being the 'simpler' ones
15:03 pmichaud since they're the ones that do explicit casting.
15:03 pmichaud whereas  cmp doesn't cast.
15:03 pmichaud (or, at least, shouldn't)
15:04 pmichaud I somewhat see you point, though -- in some sense 'cmp' can be the higher-order comparison when the types differ.
15:04 pmichaud *your
15:05 moritz_ I found <=> and leg alway much easier to explain, so to me they are "simpler"
15:05 moritz_ then cmp
15:05 seungwon left #perl6
15:05 pmichaud easier to understand, perhaps, but that doesn't make them more fundamental :-)
15:06 pmichaud electrons, protons, and neutrons are easier to understand, but not necessarily fundamental :)
15:07 * moritz_ never grokked those electrons
15:07 pmichaud anyway, the fact that cmp is defined in terms of <=>  is part of what is making Rakudo so slow at the moment.
15:07 pmichaud it's de-optimizing comparisons and type checking.
15:07 colomon pmichaud: errr...
15:08 colomon not sure how an extra function call there makes much difference one way or the other?
15:08 colomon most of the super common cases are already optimized away anyway.
15:08 pmichaud actually, they're not.
15:09 pmichaud in fact, the reason why the previous RangeIter was so slow is because Integers aren't well optimized for comparison.
15:09 colomon that was a problem a month ago.
15:10 pmichaud yes, and it's still there.  The special-cased InfiniteRangeIter was simply avoiding the slow integer comparisons
15:10 pmichaud I went back to a normal-ish RangeIter and fixed up integer comparisons and it ended up being faster than even InfiniteRangeIter
15:11 moritz_ we need profiling tools.
15:12 pmichaud currently, comparison of two Ints using infix:<after>  ends up doing   after -> cmp -> <=> -> Bridge -> Num   on each integer
15:12 pmichaud that's..... ugly.
15:12 colomon it's also trivially fixable
15:13 colomon every other case but before and after has already been fixed
15:13 colomon so far as I know
15:13 pmichaud no
15:13 pmichaud even comparing two ints using  ==   ends up doing    == -> <=> -> Bridge -> Num
15:13 colomon no it does
15:13 pmichaud oh, you're right
15:13 colomon doesn't
15:13 colomon multi sub infix:«<=>»(Int $a, Int $b) {
15:13 colomon pir::cmp__III($a, $b);
15:13 colomon }
15:13 pmichaud anyway, I'd argue that   cmp(Int $a, Int $b)   should also use the pir::cmp
15:14 colomon whoops, wrong one.
15:14 colomon which it does
15:14 colomon multi sub infix:«cmp»(Int $a, Int $b) {
15:14 colomon pir::cmp__III($a, $b);
15:14 colomon }
15:14 pmichaud oh
15:14 colomon you added that one
15:14 pmichaud silly «
15:14 colomon I added all the other Int  Int and Num Num cmps and <=>s this morning
15:14 pmichaud oh, perhaps I didn't git pull
15:14 masak colomon++
15:15 justatheory joined #perl6
15:15 pmichaud anyway, my question remains -- should  cmp   be defined in terms of <=>  or vice-versa?
15:15 pmichaud the spec says it should be the other way around... and I'm inclined to agree.
15:15 colomon what are the practical differences?
15:15 masak cmp does feel like the general one.
15:15 pmichaud <=>  always coerces to numeric
15:16 pmichaud and then does a numeric cmp
15:16 dalek rakudo: 21f3104 | moritz++ | build/PARROT_REVISION:
15:16 dalek rakudo: bump PARROT_REVISION to get some testing after the merge of the parrot
15:16 dalek rakudo: gc_treshold_tuning branch
15:16 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/21f3104a4363f42a246d5252150e45f8442f31eb
15:16 dalek rakudo: 869b1fc | moritz++ | src/core/ (2 files):
15:16 dalek rakudo: Merge branch 'master' of github.com:rakudo/rakudo
15:16 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/869b1fc3c3479a088cb8fb8936ea3f75b79fff59
15:16 pmichaud it's not always possible (or desirable)  to take the arguments to cmp and make them somehow Numeric
15:17 pmichaud in particular, if I have a type that defines .Numeric, then <=>  should work for that type without having to overload <=> for it
15:17 moritz_ I don't understand the difference, as long as cmp only re-dispatches to <=> when both args are Numeric
15:18 moritz_ which I think is currently the case; otherwise 'a' cmp 'b' wouldn't work at all
15:18 pmichaud it's more a question of what <=>  does when its arguments aren't numeric, I think.
15:18 moritz_ rakudo: for <a b c> { say $_ cmp 'b' }
15:18 p6eval rakudo 10041c: OUTPUT«-1␤0␤1␤»
15:18 moritz_ it coerces
15:18 moritz_ either way
15:18 pmichaud moritz_: it coerces and then uses <=> on itself?
15:19 colomon I think pmichaud is right.
15:19 pmichaud I mean,    $a <=> $b    ends up being  +$a <=> +$b   ?
15:19 pmichaud (when $a and/or $b aren't numeric)
15:19 moritz_ yes
15:19 pmichaud same for leg, then?
15:19 colomon I was thinking of <=> as more fundamental, but actually cmp(Numeric, Numeric) is the fundamental, in some sense.
15:20 pmichaud i.e.,  $a leg $b  is   ~$a leg ~$b   ?
15:20 moritz_ yes
15:20 colomon well, hmmm.
15:20 moritz_ in my mind, cmp(Numeric, Numeric) and <=>(Numeric, Numeric) behave exactly the same
15:21 moritz_ why does it matter which one is more fundamental?
15:21 colomon moritz_: overloading
15:21 pmichaud because of what you may or may not need to define for custom types....
15:21 ruoso joined #perl6
15:21 moritz_ hm
15:21 moritz_ I'd buy that argument if we had lift(), and used it
15:21 colomon at the same time, it sure seems like a world of suck if <=> is less efficient than cmp is for numbers.
15:22 pmichaud actually, I suspect that <cmp>  gets used far more often than <=>  at the moment
15:22 pmichaud all of the comparison functions are defined in terms of &infix:<cmp>
15:22 colomon right
15:22 pmichaud so right now we pay the penalty on things like sort and series
15:23 pmichaud because they're defined in terms of   cmp and before and after
15:23 pmichaud and I don't see a problem with having an optimized <=> for numbers
15:24 pmichaud but the default  <=>  should probably be defined in terms of cmp
15:24 colomon it certainly seems to me we need to optimize cmp, before, and after for numbers.
15:24 pmichaud well, optimizing cmp is probably good enough
15:25 pmichaud but that gets back to "this is what the spec wanted in the first place"
15:25 colomon it's just hard to see how to balance that with not pessimizing <=> for the Numeric, Numeric case AND making it easy to overload the operators for new types.
15:25 kst joined #perl6
15:25 pmichaud ?
15:25 pmichaud I don't see the problem.
15:26 moritz_ as long as we don't optimize (Numeric, Numeric) but specific types (Int, Int) and (Rat Rat) we should be fine
15:26 colomon by spec, if you define a new Numeric type and a new cmp on it, that should change the operation of <=> for that type as well, right
15:26 colomon >?
15:27 pmichaud by spec,  <=>  would be defined in terms of the types   .Numeric, and have nothing to do with cmp
15:27 colomon I thought you said <=> was defined as +$a cmp +$b?  or is that only if <=> is operating on non-Numeric?
15:27 arnsholt Does nqp-rx handle multiple return values?
15:29 colomon at any rate, agreed that cmp should be better, and will fix that today after lunch if I get the chance.
15:29 pmichaud <=>  is defined as +$a cmp +$b.  I suspect that <=>  on numerics can be optimized.
15:29 colomon right now, I've got to get a small guy (he insists, "baby" no longer) ready for lunch.  :)
15:31 colomon btw, what dowe need for lift?
15:31 colomon *do we
15:31 moritz_ I plan to give lift a shot once we have compile-time lexpads
15:33 moritz_ oh wait, maybe we don't even need that...
15:33 ashleydev joined #perl6
15:33 pmichaud yes, I'm not sure how 'lift' enters into this picture.
15:33 pmichaud oh, because you want  <=>  to have lifted cmp semantics?
15:34 pmichaud that wouldn't feel right.
15:37 moritz_ huh, my docs/test_summary.times isn't valid JSON
15:38 moritz_ there are commas missing
15:39 dalek rakudo: f100e9d | pmichaud++ | src/core/ (3 files):
15:39 dalek rakudo: Using double-angles around 'cmp' makes them harder to find (e.g., with ack).
15:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f100e9dcd210dafa33ffb1ed23a88a29efc5110d
15:40 * pmichaud decides to pound on book building for a while.
15:43 justatheory joined #perl6
15:46 pmichaud when building the book, I keep getting errors about UsingPerl6.A4.d not being found
15:47 pmichaud (or UsingPerl6.Letter.d)
15:47 pmichaud what is it looking for and where?
15:48 colomon pmichaud: that's what made moritz_ think of lift this morning, but in general, it seems to be a significant issue for people overloading operators.
15:48 pmichaud colomon: I don't understand.
15:49 colomon if you define new versions of the standard operators right now, they don't work with sort (for comparison operators), or any of the meta-ops.  and that's just the tip of the iceberg
15:49 pmichaud example?
15:50 pmichaud oh, I understand what you mean by meta-ops, yes.
15:50 colomon someone had one a day or two ago.  if you define your own cmp, sort doesn't recognize it unless you explicitly pass it in
15:50 pmichaud right
15:50 pmichaud that part I understand.  That seems unrelated to the factoring, to me.
15:51 colomon well, if <=> is defined in terms of cmp, then it may be an issue if you overload cmp.
15:51 pmichaud *no*
15:51 colomon but that's really very much a side issue to the factoring, agreed.
15:51 pmichaud the default <=>  always uses   infix:<cmp>(Numeric, Numeric)
15:51 pmichaud that's the point.
15:52 pmichaud unless prefix:<+>  somehow returns something that isn't Numeric.
15:52 pmichaud overloading cmp for a custom type wouldn't have anything to do with <=>
15:53 pmichaud because <=>  always ends up calling  cmp(Numeric, Numeric)
15:53 colomon the default <=> (in theory) should always use +$a cmp +$b
15:53 pmichaud right
15:53 colomon but that's not necessarily cmp(Numeric, Numeric)
15:53 pmichaud and +$a (in theory) should always return a Numeric
15:53 colomon yes, but cmp may be overloaded for something else.
15:53 colomon like Int, Int
15:54 pmichaud but that doesn't matter!
15:54 pmichaud you're saying someone would overload  cmp(Int, Int)  ?
15:55 colomon no, I'm saying someone probably will overload cmp(BigInt, BigInt).
15:55 colomon or whatever.
15:55 colomon gotta run, alas.  more later.
15:55 pmichaud ....why would we have a BigInt?
15:55 pmichaud Int is already BigInt
15:55 * pmichaud is now *very* confused.
16:00 masak colomon: speaks, confuses, and leaves. :)
16:01 huf confuse a rakudo dev in collaboration with confuse a cat ltd
16:01 pmichaud is there anyone around knowledgable about the build system for the book that can help me get past my current "can't build the book" woes?
16:02 moritz_ pmichaud: pronik is in #perl6book
16:02 moritz_ pmichaud: he wrote most of the build system
16:03 pmichaud moving to #perl6book
16:07 kst joined #perl6
16:13 15SAAORV0 joined #perl6
16:14 moritz_ nine: ping
16:19 Clem joined #perl6
16:29 masak nom &
16:29 frettled nom nom
16:30 * frettled is (slowly) finishing off around 400-500 g tenderloin of pork.
16:33 gfldex std: class A { method &.($c) {}; };
16:33 p6eval std 31912: OUTPUT«Potential difficulties:␤  $c is declared but not used at /tmp/NZDBEfrEXT line 1:␤------> [32mclass A { method &.([33m⏏[31m$c) {}; };[0m␤ok 00:01 114m␤»
16:33 gfldex std: class A { method &.($c) { say $c.WHAT }; };
16:33 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
16:33 gfldex rakudo: class A { method &.($c) { say $c.WHAT }; };
16:33 p6eval rakudo 10041c: OUTPUT«===SORRY!===␤Malformed method at line 22, near "&.($c) { s"␤»
16:35 ajs joined #perl6
16:38 azert0x joined #perl6
16:38 azert0x joined #perl6
16:39 ashleydev joined #perl6
16:42 proller joined #perl6
16:47 gfldex std: use v6;  my Any $o; my Code $m;  class Foo {   method bar(){ say "bar called"; }; };  my $f = Foo.new();  $o = $f; $m = &Foo::bar; $o.$m();
16:47 p6eval std 31912: OUTPUT«ok 00:01 121m␤»
16:47 gfldex rakudo: use v6;  my Any $o; my Code $m;  class Foo {   method bar(){ say "bar called"; }; };  my $f = Foo.new();  $o = $f; $m = &Foo::bar; $o.$m();
16:47 p6eval rakudo 10041c:  ( no output )
16:48 kst joined #perl6
16:51 pmichaud gfldex: method bar doesn't appear in the namespace unless you specify 'our'
16:52 gfldex i did asked p6eval because i got a null pmc, what should be fixed with updating rakudo
16:53 meppl joined #perl6
16:56 barika joined #perl6
16:56 ruoso joined #perl6
17:03 * jnthn back
17:07 Axius joined #perl6
17:09 masonkramer joined #perl6
17:14 rindolf jnthn: hi.
17:15 jnthn o/ rindolf
17:32 kst joined #perl6
17:46 pnate joined #perl6
17:48 whiteknight joined #perl6
17:51 Su-Shee joined #perl6
17:51 Su-Shee yo folks.
17:51 molaf joined #perl6
17:52 mberends joined #perl6
17:52 rindolf Hi Su-Shee
17:53 rindolf Su-Shee: how was your weekend?
17:53 rindolf Su-Shee: thanks for following me on Twitter.
17:53 Su-Shee rindolf: exhausting, I partied into my birthday. ;)
17:53 rindolf Su-Shee: ah.
17:54 gfldex happy birthday Su-Shee!
17:54 rindolf Su-Shee: Mazal Tov!
17:54 colomon pmichaud: last I heard, someone out there was trying to write a BigInt class to use until we get Int going in the core.  But it was just a generic example.
17:55 molaf joined #perl6
17:57 colomon happy birthday!
17:58 * avar wonders if anyone here saw http://blogs.perl.org/users/aevar_arnfjor_bjarmason/2010/08/lets-add-git-userdiff-defaults-for-perl-and-perl-6.html
17:59 gfldex std: use v6; my Any $o; my Code $m;  class Foo {   has Int $.counter = 0;   our method bar(){     $.counter++;     say "bar $.counter times called";   }; };  my $f = Foo.new(); $o = $f; $m = &Foo::bar; $o.$m();
17:59 p6eval std 31912: OUTPUT«ok 00:01 121m␤»
17:59 gfldex rakudo: use v6; my Any $o; my Code $m;  class Foo {   has Int $.counter = 0;   our method bar(){     $.counter++;     say "bar $.counter times called";   }; };  my $f = Foo.new(); $o = $f; $m = &Foo::bar; $o.$m();
17:59 p6eval rakudo f100e9: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in 'Foo::bar' at line 6559:CORE.setting␤  in main program body at line 22:/tmp/CbX0kSXDtX␤»
18:00 gfldex what am i doing wrong? http://gist.github.com/525747
18:03 pmichaud Su-Shee: happy birthday?  what day?
18:03 pmichaud s/\?/!/
18:04 pmichaud colomon: even presuming someone creates BigInt (let's call it MyInt for now), I don't see why that poses a difficulty.
18:05 pmichaud well, I see how the lack of 'lift' might be a difficulty then.
18:05 Su-Shee pmichaud: today. :)
18:05 pmichaud Su-Shee: happy birthday.  my birthday was 2 days ago.  There are a lot of August birthdays it seems :-)
18:06 Su-Shee pmichaud: oh, congrats. :) yeah, we also have 4 in the office (out of 9 people ;)
18:06 colomon \o/
18:06 Su-Shee what you too? ;)
18:07 mberends happy birthday to y'all :)
18:08 rindolf pmichaud: happy birthday.
18:12 Eevee joined #perl6
18:13 colomon pmichaud: BigInt is actually a pretty good choice for an example, because it points up the potential problem nicely.  If the BigInt developer writes infix:<cmp>(BigInt, BigInt), should she expect infix:«<=>» to use that infix:<cmp>?  It's a significant thing, because generic infix:<cmp>(Real, Real) is only as precise as Num...
18:13 pmichaud colomon: would the BigInt developer also have .Numeric defined?
18:13 colomon pmichaud: yes
18:14 pmichaud colomon: then <=>  would end up using cmp
18:14 pmichaud because <=>  would call .Numeric, the results of which would then be passed to cmp
18:14 kst joined #perl6
18:14 pmichaud presumably .Numeric would return self in that case
18:15 colomon but without lifting, it won't call cmp(BigInt, BigInt)
18:15 colomon because that doesn't exist in the setting
18:15 pmichaud agreed, we'd need lift there to make that ultimately work
18:15 colomon right, that's why we were talking about lift
18:15 pmichaud 18:05 <pmichaud> well, I see how the lack of 'lift' might be a difficulty then.
18:15 colomon gotcha
18:16 pmichaud anyway, the person implementing BigInt is free to overload <=> as well.
18:16 pmichaud having cmp be based on <=>  is the exact same problem in reverse :-)
18:16 colomon absolutely
18:19 pmichaud jnthn: ping
18:22 pmichaud phenny: tell jnthn  what was the trick you used to output pbc files from PIR?  I tried it on the plane home from .it and couldn't get it work except in very limited cases
18:22 phenny pmichaud: I'll pass that on when jnthn is around.
18:24 Felipe__ joined #perl6
18:25 Felipe__ joined #perl6
18:25 leprevost joined #perl6
18:34 Eevee joined #perl6
18:37 fod joined #perl6
18:37 jnthn pmichaud: pong
18:37 phenny jnthn: 18:22Z <pmichaud> tell jnthn  what was the trick you used to output pbc files from PIR?  I tried it on the plane home from .it and couldn't get it work except in very limited cases
18:38 jnthn pmichaud: You get the eval PMC and write it to a file iirc.
18:38 jnthn Oh, stringify it first I think
18:38 jnthn $S0 = the_eval_pmc
18:38 jnthn Then write that.
18:40 ingy jnthn, pmichaud: http://gist.github.com/525796
18:41 * ingy is writing a little blog post :)
18:41 jnthn (BigInt) I suspect that this may be do-able by the Int class mixing a BigInt role into itself. What we don't want is to always do bigint operations or to have to do a check on every operation to see whether we've got an upgraded Int or one just using the native int type. In essence, it'd somewhat be a type-based decision but we can hide it and claim to be an Int to the world either way.
18:41 colomon woo-hoo, only about 100x slower!
18:42 ingy colomon: _under_ 2 mins! \o/
18:42 colomon ingy: was it worse before?
18:42 ingy colomon: I don't know
18:43 jnthn 100x slower is bad, but I'm optimistic we can significantly improve on it. :-)
18:43 ingy jnthn: of course you can
18:43 ingy it's just a matter of when
18:43 colomon jnthn: huh.  how would that interact with operators?
18:43 ingy I want to make the case that maybe soon is a good time to shift focus towards that for a while
18:44 colomon ingy: you sure don't have to convince me
18:44 ingy well you have to pick some goals over others
18:44 jnthn ingy: That's why I seem to have disappeared from day to day Rakudo development at the moment.
18:45 ingy jnthn: to speed it up, or two program in a fast lang?
18:45 ingy ;)
18:45 jnthn ingy: I'm actually madly hacking away at a bunch of new meta-model prototyping and working out other changes to get us there. :-)
18:45 jnthn colomon: The whole way we do operator bodies now is So Wrong And Silly.
18:45 jnthn colomon: For numeric operations.
18:45 colomon jnthn: oh?
18:45 jnthn It's going to change drastically.
18:45 jnthn Yes
18:46 jnthn Here's what sucks
18:46 tadzik joined #perl6
18:46 jnthn We do a multi-dispatch by type
18:46 jnthn We often then use Parrot opcodes
18:46 ingy jnthn: to be fair, testml does a runtime parse of the testml docs. I suspect that's the main issue.
18:46 jnthn Which go and do a multi-dispatch too.
18:46 ingy jnthn: that's why I want to get pegex to p6
18:47 tadzik o/
18:47 colomon pegex?
18:47 ingy but that's waiting for an external regex engine
18:47 ingy colomon: http://pegex.org
18:47 jnthn Oh, actually I think we switched to using the add_nnn variants...maybe
18:47 ingy colomon: short answer: p6 rules for all langs
18:48 ingy colomon: currently implemented in Perl 5, and Python very soon
18:48 jnthn OK, then it's not quite so bad. But we still have twice as many PMCs (or three times as many perhaps) as we really need when we have an Int object. :)
18:48 ingy jnthn: is there any tools I can use to see where the main problems are?
18:49 jnthn ingy: Parrot has some profiler that may be able to help.
18:49 colomon I've been wondering what would be required to implement a Rakudo profiler.
18:49 jnthn ingy: But not sure how well it works on Rakudo code.
18:49 jnthn colomon: Well, take the Parrot one + make it aware of HLL annotations if it isn't = not bad :-)
18:49 ingy jnthn: I'll need some tuit days for that. Maybe we can pair up at osdcfr
18:50 jnthn ingy: Yes, I did before manage to get the profiler to work. :-)
18:51 dalek joined #perl6
18:54 kst joined #perl6
18:56 sorear good * #perl6
18:56 ingy sorear: whatever
18:56 tadzik sorear: o/
18:56 ingy ;)
18:57 jnthn o/ sorear
18:57 masak joined #perl6
18:57 masak ahoj!
18:58 ingy sorear: http://gist.github.com/525796  I'd like to see niecza's comparison :)
18:58 tadzik lolitsmasak!
18:58 ingy hi masak
18:58 colomon \o
18:58 * masak waves :)
18:58 jnthn lawltismasak!
18:58 masak Su-Shee: happy belated birthday!
18:59 masak oh, it's today, even. I'm on time :)
18:59 Su-Shee I'm still suffering, hasn't ended yet. ;)
18:59 jnthn Happy birthday, Su-Shee :-)
18:59 jnthn Suffering? Sounds like your doin it rite. :-)
19:00 * masak .oO( birthday rites... )
19:00 Su-Shee and I don't even drink ;)
19:00 pmichaud jnthn: (write pbc)   hmmm
19:00 masak what kind of suffering are we talking about here, then?
19:01 jnthn Su-Shee: Oh!
19:01 jnthn pmichaud: How were you doing it?
19:01 Su-Shee masak: the 12 hour partying until 7 suffering, mostly.
19:01 pmichaud jnthn: http://gist.github.com/525830
19:01 masak Su-Shee: wow. sounds like you *are* doing it right :)
19:02 sorear ingy: it'll be nearly the same as rakudo
19:03 sorear ingy: for test suite-like things, niecza and rakudo runtime are both dominated by the parser
19:03 jnthn pmichaud: youch!
19:03 sorear niecza's parser is ~50% slower, but the backend compiler is currently faster
19:03 Su-Shee does anybody know how the dancer port is coming along?
19:03 jnthn pmichaud: I was generally generating the PIR and then translating it to PBC and writing that in the same proccess.
19:03 sorear so maybe 2m 20s
19:04 jnthn pmichaud: Not sure why that would make a difference though.
19:04 tadzik Su-Shee: mberends is caring about it
19:04 pmichaud jnthn: in this case I'm taking some pretty common and uninteresting PIR, though
19:05 mberends Su-Shee: the Dancer port is at the stage of: "OMG there is sooo much to do..."
19:05 pmichaud I can get it to work fine from a .pir file -- just not from NQP, or anything that has libraries loaded
19:05 pmichaud anyway, I have to run errands with @family, so I'll bbl.  I just didn't remember if there was anything fancy you did to make it work.
19:05 jnthn k
19:05 Su-Shee mberends: oh, that stage...
19:05 cono joined #perl6
19:05 pmichaud anyway, at this point --target=pbc doesn't look at all likely.
19:06 pmichaud the following *does* work, though
19:06 masak mberends++ # reaching that stage
19:06 pmichaud http://gist.github.com/525841
19:06 pmichaud okay, gotta run
19:06 pmichaud bbl
19:16 jnthn pmichaud: I don't remember there being.
19:17 jnthn We probably need to get to the bottom of what's wrong there, otherwise we're going to be a bit screwed further down the line. :-/
19:18 Minimiscience joined #perl6
19:18 KenGuru joined #perl6
19:22 tylercurtis joined #perl6
19:22 KenGuru 2(sorear2): i'm tryin to compile niecza on windows. I'Ve installed all dependencies. Mono 2.6.7 and svn are allready installed. I'Ve installed Strawberry 5.12.1 and CPANed all dependencies. getting this error, any ideas: http://pastebin.com/D1g8F45F
19:30 Italian_Plumber joined #perl6
19:35 kst joined #perl6
19:38 dalek rakudo: c4b6df5 | (Solomon Foster)++ | src/core/ (2 files):
19:38 dalek rakudo: Move the infix:�<=>�(Numeric, Numeric) logic into infix:<cmp>(Numeric,
19:38 dalek rakudo: Numeric), and have infix:�<=>�(Numeric, Numeric) just forward to
19:38 dalek rakudo: infix:<cmp>(Numeric, Numeric).
19:38 dalek rakudo: Also implement both infix:<cmp>(Real, Real) and infix:�<=>�(Real, Real) in
19:38 dalek rakudo: terms of infix:<cmp>.
19:38 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c4b6df51b01a76b8ce0dcfbcbc828cf6a44f6bdb
19:45 sorear KenGuru: what version of make do you have?
19:45 KenGuru erm, the one from the mono bin
19:46 KenGuru 3.81
19:46 sorear gmake? nmake? bsdmake?
19:46 KenGuru gnu make 3.81
19:46 KenGuru i386-pc-mingw32 build
19:46 KenGuru running on win7 x64
19:46 KenGuru :D
19:47 KenGuru i should use a linux distro to build ...
19:48 * masak is really enjoying using the less frequently used operators +> and +< today
19:48 tadzik what are they?
19:48 masak at one point, I had »%» in the code :)
19:48 masak tadzik: binary shifts.
19:48 tadzik oh
19:48 masak tadzik: I'm writing pack and unpack.
19:48 masak tadzik: in C, they look like this: >> and <<
19:48 tadzik yeah, I see the progress on GH. masak++
19:49 tadzik I know them :)
19:49 masak tadzik: there are a few more commits to come before I pack it in tonight :)
19:49 sorear KenGuru: just to confirm, what is line 20 of STD_checkout/Makefile
19:51 masak this error in the ng flavour of Rakudo really means "syntax error": "Unable to parse blockoid, couldn't find final '}'"
19:51 x3nU joined #perl6
19:51 masak it would be slightly less awesome of the error said what it found instead. :)
19:52 masak to its credit, the error message does provide the right line and file :)
19:53 KenGuru PERL6LIB=./lib:.
19:54 jnthn masak: slightly mess or slightly more? :-)
19:54 jnthn er, less :-)
19:54 KenGuru sorear:PERL6LIB=./lib:.
19:54 masak jnthn: hm. I meant "slightly less LTA" :)
19:56 sorear KenGuru: somehow, PERL6LIB is getting set to .\lib;.
19:56 sorear which is wrong
19:56 sorear :/
19:56 jnthn SMA (Slight More Awesome) :-)
19:58 * masak adopts that at once
19:59 masak it could also mean Somewhat More Awesome, Subtly More Awesome, or So Much Awesomer :)
19:59 mberends masak: don't pack it in yet! (scnr)
19:59 masak mberends: it's going extremely well tonight.
20:00 masak mberends: I'm basically tying up loose ends.
20:00 jnthn oh no
20:00 jnthn SMA also carries a slight connotation in the first two letters that it may be a bit painful to get the improvement. :-)
20:00 mberends masak++ # very valuable work
20:00 KenGuru sorear:which path do I have to specify?
20:01 masak jnthn: thought that was official Perl 6 policy. :)
20:01 tadzik mberends: you meen HTTP::Body and MIME::Types as Dancer prerequisites, right?
20:02 jnthn masak: Will packtest.t become a spectest before you merge?
20:02 masak jnthn: yes. I also have an unpacktest.t here now.
20:02 masak both will become t/spec files.
20:04 mberends tadzik: the former maybe, but it could be an internal class rather than an external dependency, The latter probably should be an external prereq.
20:04 jnthn masak: Excellent.
20:05 sorear KenGuru: you specified .\lib;. yourself?
20:06 sorear I thought that was just make being stupid and trying to rewrite paths
20:06 KenGuru 2(sorear2): the default from your makefile was .\lib:i and i changed it to .\lib;.
20:06 masak jnthn: after that, I thought I'd do prefix:<~^> infix:<~&> infix:«~<» infix:«~>» infix:<~^>, and then call it a night :)
20:07 jnthn :-)
20:07 sorear KenGuru: it should just be ./lib:., no i involved
20:07 masak pugs: say "foo" ~& "bar"
20:07 p6eval pugs: OUTPUT«bab␤»
20:07 sorear CursorBase uses split ':' to break up $PERL6LIB
20:08 masak dang, Pugs already has those :)
20:09 sorear unfortunately with this big maze of Makefiles my situation is fairly no-win
20:10 KenGuru i'll try setting up a nix ...
20:11 gbacon joined #perl6
20:11 sorear I can't just use $Config{path_sep} because, well, the Makefile doesn't have access to it
20:11 sorear maybe I should just switch STD to Module::Build
20:11 sorear :-)
20:11 KenGuru it's a path separator problem
20:11 sorear yes
20:11 sorear : is the only path separator STD supports for %PERL6LIB%
20:12 KenGuru its an OS issue
20:12 KenGuru changed the ./lib:. to .\lib:. and now i've got it running, but now faced with another error ...
20:13 sorear ./lib didn't work?
20:13 masak rakudo: say 48 + (0 +< 8); say (48 + 0) +< 8; say 48 + 0 +< 8; # should equal former (since +< has multiplicative tightness), but equals latter
20:13 p6eval rakudo f100e9: OUTPUT«48␤12288␤12288␤»
20:13 KenGuru no
20:13 * masak submits rakudobug
20:13 KenGuru curiuos
20:14 sorear what's the new error?
20:14 kst joined #perl6
20:15 masak rakudo: say 48 + 0 +> 8
20:15 p6eval rakudo f100e9: OUTPUT«0␤»
20:15 masak also wrong.
20:17 jnthn lolkassoperator
20:18 masak it's a good sign that I didn't immediately jump to the conclusion that Rakudo was wrong... as I would have one or two years ago :)
20:19 masak Rakudo++
20:19 KenGuru sorear:http://pastebin.com/t0AVUi7y
20:21 mberends sigh. The p5 OpenGL examples seem to be so near to p6, yet so far. On Ubuntu they Just Work with p5.
20:21 Guest23195 left #perl6
20:26 sorear KenGuru: oh right, that.
20:30 drake1 joined #perl6
20:30 drake1 hello, can you pack for a specific alignment in perl6?
20:31 masak all unpack tests pass! yay
20:31 masak drake1: funny you should ask that :)
20:31 drake1 crazy
20:31 mberends masak++ \o/
20:31 masak drake1: presently, no.
20:31 sorear KenGuru: have you changed anything else in STD_checkout?
20:31 masak drake1: but if it works in Perl 5, there's a big chance we'll get it in the next month or so.
20:32 masak (in Rakudo)
20:32 sorear the fact that it's not working doesn't suprise me, but I can't figure out how you got *to* that error...
20:32 masak drake1: if you give me a use case, I can probably fix it for you in shorter time that that.
20:32 drake1 masak: I don't think perl5 has it
20:32 masak drake1: I know perlpacktut talks about alignments.
20:33 masak drake1: grep for 'Align' in perldoc perlpacktut
20:33 drake1 ok
20:33 KenGuru no
20:33 masak ok, time to merge with master, before I get too greedy and drift away from it. :)
20:33 KenGuru i started xbuild once
20:34 KenGuru svn did a checkout of the std
20:34 drake1 masak: there's a whole chapter about packing C-structures that I didn't read. thanks
20:34 KenGuru i missed the cpan dependencies first
20:35 KenGuru grab them via cpan install module
20:35 masak drake1: when you've read it, and come back wanting the same for Perl 6, let me know. :)
20:35 KenGuru and did a xbuild again resulting in the error
20:36 masak latest changes are up at http://github.com/rakudo/rakudo/tree/buf
20:36 masak commencing merge/build/spectest.
20:36 KenGuru i wisely not used the program files folder because of windows7 madnes ...
20:38 KenGuru 2(sorear2): what os (distrubution) do you use to build niecza?
20:39 snearch joined #perl6
20:39 sorear debian (though, this system was installed quite some time ago)
20:39 drake1 masak: in perl5 you have to specify the alignment through padding templates
20:39 sorear snarkyboojum has gotten it working on OS X 10.5
20:39 sorear not sure what moritz_ is using
20:39 masak drake1: aye.
20:39 sorear it troubles me that it doesn't work on Windows thoguh
20:39 masak drake1: it's crude but it works.
20:40 masak drake1: if you come up with a less crude way, I'd like to hear about it.
20:40 drake1 masak: it's fine enough
20:40 sorear I guess the sane thing to do would be to make STD use the filesystem less
20:40 drake1 masak: some kind of "align" command
20:41 masak drake1: 'some kind of' qualifies as hand-waving :)
20:41 masak I was thinking more of a grandiouse vision :P
20:41 masak go wild!
20:41 drake1 a perl embedded kind, then
20:42 drake1 masak: like a generic variable for the alignment
20:43 pugssvn r32003 | masak++ | [t/spec/S32-str] added pack.t/unpack.t for the new Rakudo &pack/&unpack
20:43 pugssvn r32003 |
20:43 pugssvn r32003 | Actually, there was an old pack.t there, but it was all wrong,
20:43 pugssvn r32003 | so bulldozed it.
20:43 masak drake1: sorry, I'm not following. it's a bit too abstract.
20:43 masak drake1: I have my brain on a very short leash. it likes things to be concrete.
20:43 masak as in code examples.
20:44 KenGuru 2(sorear2): i'll testing it for you, if you're going to do any changes ..
20:45 drake1 $#=32 for 32 bit alignment or whatever. to match the local C compiler it might make sense to use template specifiers with C struct standard padding
20:45 sorear testing to make sure I haven't broken *nix takes 20 minutes and all my memory
20:45 sorear so I don't like to change it much
20:46 sorear :/
20:46 masak drake1: a variable such as '$#' sounds like a p5ism :) I'm guessing Perl 6 would want something more like a specialized DSL for packing aligned things. probably with fewer symbols and more words.
20:47 masak drake1: but beyond that, I'm not sure how it would look.
20:47 drake1 masak: something like a struct declaration
20:47 masak ooh
20:48 masak maybe even *exactly* like a C struct?
20:48 drake1 pack("int;char;struct test *;" etc
20:48 sorear constant $?ALIGN then do caller.hints('$?ALIGN')
20:48 masak and it'd just get translated into the right pack/unpack template :)
20:48 sorear niecza: sub foo() { say caller.hints('$?ALIGN'); }; { constant $?ALIGN = 8; foo(); }
20:49 p6eval niecza 5b8140e: OUTPUT«(timeout)»
20:49 sorear I don't have CALLER::<$?ALIGN> working yet though
20:49 sorear niecza: sub foo() { say caller.hints('$?ALIGN'); }; { constant $?ALIGN = 8; foo(); }
20:49 p6eval niecza 5b8140e: OUTPUT«8␤»
20:49 sorear ok, it only works on a hot cache
20:49 sorear interesting
20:52 masak hot cache?
20:52 KenGuru 2(sorear2): thx anyway. i'm goin to use *nix for compilation. is there a binary release for niecza?because i'll have to make a fresh install
20:59 kst joined #perl6
21:00 sorear masak: the first time I ran niecza on p6eval, it timed out, presumably due to virtual memory
21:01 masak sorear: ah, so you didn't do anything in between? I see.
21:01 masak "Continuations in Natural Language". whoa. http://www.cs.bham.ac.uk/~hxt/cw04/barker.pdf
21:01 drake1 (union int;char)char for union padding. maybe it's best to let it be
21:02 masak drake1: depends on one's willingness to implement that. :)
21:02 drake1 yes
21:03 masak drake1: would you agree that it'd be interesting to follow the C declaration syntax quite closely?
21:03 drake1 masak: then it's probably faster to implement the binary interface
21:03 masak I'm not familiar with that.
21:04 drake1 perl XS or something
21:04 masak oh.
21:04 ingy http://blogs.perl.org/users/ingy_dot_net/2010/08/perl-6-surely-but-slowly.html
21:04 masak sounds like Zavolaj, then.
21:05 masak ingy: thanks for phrasing that as positively as you did :)
21:05 * masak would have it as just "Rakudo is slöööööööööw" :)
21:07 ingy hähä
21:07 drake1 actually an "open(BINOUT,"|ascii2binout")" with a scanf might be a lot more flexible so why even bother
21:09 drake1 with the output buffer, it's typically faster than a call chain in C
21:10 sorear ingy: Would you take a look at Niecza's Test.pm6 and tell me if I'm on the right track?
21:10 ingy I was chatting with nothingmuch earlier today. He basically thinks that Perl 6 had no future. But I think really think you guys are doing great things. Who cares if no company ever takes over the world with Perl 6...
21:10 ingy -Ofun forever
21:10 ingy sorear: sure
21:10 Ken-Guru joined #perl6
21:10 sorear ingy: I spoke with nothingmuch a couple months ago
21:11 ingy sorear: I should try to run the TestML suite on niecza
21:11 ingy I just think nothingmuch is completely burnt out on programming
21:11 sorear ingy: his arguments boiled down to "this is a trainwreck of adding features with no regard for efficient implementation and it will never be usable without an overhaul of process"
21:12 ingy seems accurate
21:12 sorear multi dispatch was his favorite target
21:12 masak seems to me TimToady is thinking quite a lot about hotspots for optimization.
21:12 p6eval joined #perl6
21:13 * ingy wonders why TimToady would even care about such things
21:13 ingy that's what @jnthn is for
21:13 masak ingy: if that kind of division really existed, I would probably agree with nothingmuch.
21:13 ingy I guess @jnthn ~~ $TimToady
21:14 masak I respect nothingmuch's opinion, but to me it sounds like an outsider peering in, and not quite seeing what's happening.
21:14 masak perhaps he's been reasing p6l too much :)
21:14 ingy masak: totally agree
21:14 ingy I was telling nothingmuch about how much energy was in this channel
21:15 masak I like -Ofun too, but if I didn't believe what we have will eventually be fast, usable, and in some sense disruptive, I'd probably wander off.
21:15 azert0x joined #perl6
21:15 japhb mberends, You mentioned P5 OpenGL examples a while back -- which ones are you referring to?
21:15 ingy I personally have no stake in Perl 6, but the energy here is fantastic for Acmeism
21:16 masak I hope to someday be as experienced a programmer as nothingmuch. and I hope that by then, Perl 6 will be the tool that I wield for everyday production tasks :)
21:16 Juerd What's acmeism?
21:16 ingy masak: -Ofun means finding out how to get speed in some insanely cool way that nobody has thought of yet
21:16 sorear masak: nothingmuch is, or was, the Audrey of #moose.  Being jaded is quite out of character for him
21:16 masak Juerd: acmeism represents proglang anti-tribalism, IIUC.
21:17 ingy sorear: like I said, he's just going through a little programming burnout
21:17 Juerd I know what represents means :) \o/
21:17 Juerd All the other words... no idea.
21:17 ingy usually @sex is the cure...
21:17 Juerd @sex, not %sex?
21:17 ingy :D
21:17 masak Juerd: tribalism. Python people hating on Perl people hating on PHP people.
21:17 Juerd &sex :)
21:18 ingy Juerd++
21:18 masak Juerd: I should have written 'programming language', but I was lazy.
21:18 Juerd Oh!
21:18 ingy Juerd: acmeism.org
21:18 Juerd See... that's why I don't like abbreviations :|
21:18 masak Juerd: how's that commit bit coming along?
21:18 masak oh, and anyone else want to vote on the whole .fmt/.format thing?
21:19 Tene masak: what's the actual question?
21:19 masak grep yesternight's backlog for it, if you want the backstory.
21:19 Tene :P
21:19 drake1 I made a fast request object, compatible with bash, python and perl, so they're only used for changes
21:19 masak Tene: short story: Juerd wants .fmt to be named .format
21:20 Tene I'd see that as a positive change.
21:20 Tene as long as nobody suggests that we support both options.
21:20 jnthn t cld b clrr.
21:20 masak I count one vote from Tene for .format
21:22 Juerd Tene: Or, alternatively, .f
21:22 pmurias no
21:22 pmurias ;)
21:22 Juerd But that'd be for historic reasons: printf, sprintf
21:22 Juerd print $foo.f("%s");
21:22 Juerd printf("%s", $foo);
21:22 masak please no
21:22 Tene I'd rather dislike that.
21:23 ingy bbl
21:23 jnthn .f would be quite the huffmanization fail.
21:23 masak we just got rid of one-char methods for Str. let's not put new ones on Any.
21:23 Juerd But my preference would be .format
21:23 masak or Cool, as it were.
21:23 jnthn .format is fine imo, but .fmt doesn't bother me too much either.
21:24 masak same here.
21:24 sorear I like fmt
21:24 * pmurias likes format
21:24 Juerd I think abbreviations should be avoided if the original isn't very long.
21:24 masak who introduced .fmt? TimToady?
21:24 Juerd Except for standard library/system calls
21:25 Tene I don't mind fmt
21:25 Juerd Tene: It's ugly and a scary precedent
21:25 Juerd Next is msg/mess/mesg
21:25 masak it's a bit cute.
21:25 sorear That's not a scary precedent
21:25 Juerd masak: Cuteness requires vowels.
21:25 sorear Please explain to me how % is in any way mnemonic
21:26 jnthn Juerd: I feel very uncute.
21:26 Juerd sorear: It's not. % is ugly.
21:26 masak hugme: hug jnthn
21:26 * hugme hugs jnthn
21:26 Juerd sorear: % is as bad as fmt, imo.
21:26 becu joined #perl6
21:26 sorear Juerd: I'm talking about %hash now
21:26 Juerd sorear: The mnemonic is that the character used in the template is also %.
21:26 Juerd I see.
21:26 Tene Juerd: There are many different types of formatting you could do to something.  "fmt" isn't an english word already, so it's clear that it has a specific meaning.
21:26 Juerd Thought you referred to python's sprintf, which is %
21:26 simcop2387 joined #perl6
21:27 masak sorear: % in %hash is a visual mnemonic. the two thingies around the oblique line represent key and value, respectively. :)
21:27 Juerd Tene: If that were a good argument, we should avoid all preexisting words.
21:27 Tene I often have at least some degree of skepticism for using generic english words for specific language meanings.
21:27 sorear If I want vowels with my programming, I know where Java is
21:27 Juerd sorear: rkd prl 6
21:28 sorear Changing fmt to format sets a terrible preceent
21:28 Tene That way lies "It's all english words that I already know, so *ANYONE* can read this code and know exactly what it means and reason about it without knowing the langauge!!"
21:28 Juerd prnt $f, $b;
21:28 Juerd Tene: At least I know how to *spell* the word.
21:28 masak this is the interesting discussion I expected yesterday :)
21:28 sorear Juerd: prt is better
21:28 Tene Juerd: "fmt" is *a different word*.
21:29 sorear or say
21:29 Juerd With abbreviations, there's no way other than just remembering it, to know if it's frmt or fmt or even formt
21:29 masak maybe we should go with .form :)
21:29 Juerd While they'd all be prononuced as "format" when read out loud.
21:29 jnthn $baby.form
21:29 Juerd masak: I could certainly live with that.
21:29 masak Juerd: it's prefix of .format, *and* a different word.
21:30 Tene I pronounce .fmt as "dot eff emm tee"
21:30 sorear I wonder what ever happened to the whole "infinitely customizable language" selling point
21:30 sorear use Juerd::Format;
21:30 masak sorear: that selling point is still there.
21:30 Juerd Tene: You should take into consideration all obvious pronunciations.
21:30 Juerd Tene: Not just the one you'd use.
21:30 masak sorear: but we want Standard Perl 6 to be good enough for many people.
21:31 Juerd sorear: I refuse to discuss dialects; the standard language should be neat and consistent regardless of all ways to extend it.
21:31 * Tene agrees.
21:31 masak that's what I meant.
21:31 Juerd fmt looks out of place
21:32 * masak .oO( No-one tell Juerd about Rat.nude... )
21:32 Juerd nude rats?
21:32 masak oops. :)
21:32 Tene Rat.numerator_and_denominator
21:32 masak rakudo: say (3/4).nude.perl
21:32 Juerd At least it's not Rat.nd
21:32 p6eval rakudo c4b6df: OUTPUT«(3, 4)␤»
21:32 Juerd Although that'd be consistent with .kv
21:32 Juerd keva
21:33 masak keva! \o/
21:33 Juerd In fact, .nd would probably be better.
21:33 masak aye.
21:33 masak ...contradiction all your arguments so far. :)
21:33 Juerd Oh well, I'll just rant about inconsistent identifiers when the language is "done"
21:33 Juerd And write something like tnx.nl/php about it :)
21:33 masak s/ion/ing/
21:34 Juerd masak: No. This is a significant abbreviation.
21:34 Juerd masak: Which makes it very useful.
21:34 Juerd afk
21:35 masak "Perl 6 is like a training car without brakes."
21:35 Tene .fmt => .put-pieces-where-the-percent-signs-are()
21:35 theclaw joined #perl6
21:36 Juerd Maybe I care too much about the bikeshed's appearance.
21:36 Juerd But I do care.
21:36 theclaw left #perl6
21:36 masak Juerd++
21:36 Tene I also agree that .format would be an improvement
21:36 Juerd afk
21:37 masak so far, .format seems to come out slightly in favour.
21:37 masak hope Juerd finds his commit bit.
21:37 Tene .fmt => .favour
21:37 masak .fmt => .the-method-formerly-known-as-fmt
21:37 Tene .u formerly
21:37 phenny Tene: Sorry, no results for 'formerly'.
21:37 phenny Tene: Sorry, no results for 'formerly'.
21:37 Juerd Where's the info about how to check out?
21:38 masak Juerd: you can check out anytime, but you can never leave. :)
21:38 Tene check out rakudo?
21:38 Juerd Tene: Specs
21:38 Juerd Was that the pugs svk thing?
21:38 Tene They're in the pugs svn repo
21:39 Tene /docs/Perl6/Spec/
21:39 masak Juerd: I'd use git svn nowadays. much preferable.
21:39 Tene svk is dead, iirc
21:39 Juerd Is this documented somewhere?
21:39 masak Juerd: I can set up a small workflow for you, if it'd help.
21:39 Juerd Yes please!
21:39 Tene svn co http://svn.pugscode.org/pugs/docs/Perl6/Spec/
21:39 * masak does it
21:39 Juerd I haven't used anything like this in ages
21:39 masak Juerd: don't listen to Tene; you'll just get the svn :)
21:40 Tene http://trac.parrot.org/parrot/wiki/git-svn-tutorial
21:40 masak oh, good.
21:40 masak someone's already done all the work for me. Tene++
21:40 Tene some of that applies, some not.
21:47 tadzik joined #perl6
21:47 tadzik sorry to interrupt, but I really prefer .fmt :)
21:47 masak one more vote for .fmt
21:48 masak TimToady: sub foo { lol: say "OH HAI" }; goto lol # can I goto into a sub?
21:48 sorear masak: you need to add a ()
21:49 masak fair enough.
21:49 jnthn sub foo and sub foo() became equivalent a while back, no?
21:49 jnthn (I know that sub foo had used to imply a default *@_ as a sop to Perl 5, but I thought we'd killed that.)
21:49 masak sorear: where does control flow go after printing "OH HAI"?
21:49 sorear jnthn: according to STD.pm6, sub foo means sub foo($_ is parcel = $OUTER::_) { }
21:49 sorear masak: S04 doesn't say.
21:50 masak sorear: that's why I'm asking.
21:50 jnthn sorear: Heh.
21:50 jnthn sorear: That feels like an implementation detail.
21:50 sorear S04:1188 says that you can't goto into a sub with parameters
21:50 jnthn I may be wrong, but I find it very surprising.
21:50 masak I wouldn't be sad if one couldn't goto into a sub.
21:51 masak the sub, after all, isn't part of the "normal flow" of the program.
21:51 sorear anyone want to comment on STD.pm6+5110?
21:52 jnthn masak: otoh, it fits the argumentless block pattern. :-)
21:52 jnthn masak: Guess it could be argued both ways.
21:53 masak jnthn: well, as opposed to all the other cases, a sub is only exited through the call stack, it never falls out into its outer blocks like all those other blocks.
21:53 jnthn troo
21:53 dalek yapsi: 7674823 | masak++ | doc/LOLHALP:
21:53 dalek yapsi: [doc/LOLHALP] added 'goto'
21:53 dalek yapsi: Yes, that's pretty low-hanging fruit at this point.
21:53 dalek yapsi: review: http://github.com/masak/yapsi/commit/7674823706544beaa962017f6caca641cbb6dcd1
21:56 pmichaud back again, briefly
21:56 masak pmichaud: .fmt or .format? :)
21:56 jnthn or .form
21:56 jnthn ;-)
21:56 masak or .f
21:56 jnthn No, not .f
21:56 jnthn :-)
21:56 masak or .bikeshed
21:57 pmichaud masak: I actually have no preference on that one.
21:57 sorear I propose .floormat
21:57 pmichaud if pushed, I'd give a slight preference to .fmt simply because it's shorter, and things that have .fmt on them tend to eat up lots of characters on my 80-char terminal anyway
21:57 pmichaud but I wouldn't consider it a "full vote in favor of .fmt"
21:58 masak pmichaud: fwiw, you just put into words what I feel is good about .fmt
21:58 masak but I also don't want to put in a full vote in favour of .fmt, because I see where Juerd is coming from.
21:59 pmichaud masak: right.  Before there was .fmt we had "sprintf", and .format isn't really any longer than that :-)
21:59 pmichaud so.... I can argue that both ways.  :)
21:59 masak :)
22:00 pmichaud besides, given that sprint-formatting strings tend to be fairly cryptic, perhaps it's good that they end up with a cryptic name :-)
22:00 pmichaud maybe it should be called .wtf
22:00 pmichaud ("write this formatted".... :-)
22:00 jnthn "way to format"
22:00 jnthn :D
22:00 jnthn oh, even better
22:00 jnthn \o/
22:00 sorear How much is known about perl6 threads?
22:01 pmichaud although I suppose that .WTF should be defined at some point in the spirit of .HOW, .WHY, etc.
22:01 masak .wtf -- 'write template format'
22:01 lue ohai o/
22:01 pmichaud sorear: very little.  We declared at yapc::eu that one of rakudo's big pushes for the next few months would be to come up with a true parallel implementation of hypers
22:01 pmichaud to sort of push the envelope on threading and parallelism in general
22:02 pmichaud (and perhaps push Parrot a bit on the same)
22:02 sorear I have threads, but I'm not sure how hypers should work
22:02 sorear My implementation of lazy lists are not locked for multithreaded shifting, and I doubt tey should be
22:03 pmichaud anyway, I'm not aware of any strong notions regarding p6 threads.... in the past it's always been "we hope someone will explore this space a bit for us"
22:04 sorear more generally, I feel there has been a bit of semantic drift for hyperops
22:04 sorear now the common use is stuff like lines() >>=>>> 1
22:04 sorear which wouldn't benefit from parallelism at all
22:04 masak sorear: oh, there are still other common uses.
22:05 jnthn Just because that use doesn't, doesn't mean no uses would.
22:05 masak sorear: I say @paths>>.=substr(...) the other day, which I really liked.
22:05 sorear I feel like there should be a lightweight vector op
22:05 masak er, I mean substr
22:05 masak subst :)
22:05 masak sorear: and >> isn't it?
22:06 sorear and it probably deserves more Huffman weight than the "I have 10,000 elements and processing each one will take 5ms)
22:06 sorear masak: we don't have enough AI to tell whether dropping the parrellel-hammer is a good idea, we need programmer input
22:07 jnthn pragmii could work for that
22:07 jnthn *pragmas
22:07 * sorear tries to refresh his memory on the Haskell implementation of parallel vector operators, misgoogles and finds an AK47 replacement parts page
22:08 masak :D
22:09 masak "we don't know what happened to this Perl 6 implementor -- he just went postal all of a sudden"
22:09 tom_tsuruhara joined #perl6
22:09 * pmichaud is a little surprised to see "went postal" in an international context :-P
22:09 pmichaud guess that meme spread pretty far :)
22:09 jnthn ..."went postal"?
22:10 jnthn <confused look>
22:10 pmichaud http://en.wikipedia.org/wiki/Going_postal
22:10 jnthn Must be an American thing. :)
22:10 pmichaud see the wikipedia entry :)
22:10 jnthn lol
22:10 masak proof that Sweden is more American than jnthn :)
22:11 jnthn OK, I'd not have ever guessed that's what it meant. :-)
22:11 lue "I went postal when the electricity was out"
22:11 masak spectests almost done. looking good.
22:11 pmichaud jnthn: but do you agree there's a chance that one of the implementors could "go postal"?  ;-)   I blame TimToady++
22:12 pmichaud at next year's yapc::eu.... LOOK OUT!!!!! MUWAHAHAHAHAHAHA
22:12 jnthn pmichaud: Next time in meatcleaverspace...
22:12 pmichaud "WHO SAYS RAKUDO IS TOO SLOW?!??!?!?  *pew* *pew* *pew*"
22:12 masak a Perl 6 implementor googles for threads, and comes up with AK47 replacement parts instead... I'd say there's a significant chance. :)
22:12 pmichaud I'd blind you all with my laser pointer but it got confiscated by airport security in Pisa  :-(
22:13 jnthn In Latvia, you'd just have got inte-riga-ted about it. :-)
22:13 masak pmichaud: airport security is a bully whom nobody dares to put down.
22:13 pmichaud masak: including me, as it turns out.  I let them have the pointer, even though it was actually a gift with a fair amount of personal value to me.  Wasn't much else to do at 22h00 though.
22:14 pmichaud I'll get a replacement somehow.
22:14 masak "I'm sorry, you're not allowed to bring that hand lotion aboard your plane. Now take off your shoes. Stand there. Turn around. Let me feel you up."
22:14 lue .oO(airport security has *all* the guns. Don't mess with them)
22:14 jnthn Flying sucks.
22:14 jnthn It's just unavoidable for some journeys.
22:14 pmichaud lue: airport security has all of the *declared* guns.  They might not have *all* of them :)
22:14 masak I googled a bit for "security theater" a while ago. it helped.
22:15 pmichaud yes, I got the full pat-down treatment at LHR also
22:15 jnthn Sorry you had to experience Heathrow. :/
22:15 pmichaud but obviously their computers indicated that I'm working on Perl 6, and therefore I'm a likely threat to "go postal"  :-P
22:15 sorear .oO(I wonder what cheap mass teleportation will do to customs)
22:15 jnthn That would be awesome!
22:16 pmichaud locally:
22:17 jnthn Airport security seem very unbothered with me most of the time.
22:17 pugssvn r32004 | masak++ | [t/spec/S32-str/encode.t] switch back to slurpy .new
22:17 pmichaud pmichaud@plum:~/rakudo$ ./perl6
22:17 pmichaud > say 48 + 0 +< 8
22:17 pmichaud 48
22:17 jnthn Dunno why.
22:17 jnthn I'm not complaining though. :-)
22:17 masak pmichaud: you fixed it? great!
22:17 jnthn \o/
22:17 jnthn pmichaud++
22:17 masak then I can remove some parentheses.
22:17 pmichaud trivial fix, actually.
22:17 pmichaud just spectesting it now.
22:17 masak pmichaud: you'll need to pull before you push :)
22:18 pmichaud I just did a pull.
22:18 pmichaud
22:18 masak you'll need to pull again. :)
22:18 pmichaud indeed, so I do.
22:18 pmichaud restarting spectest
22:18 pmichaud after pull
22:18 pmichaud okay, time for me to go some important Lego building work
22:18 pmichaud *go do
22:19 jnthn .oO( could we build Perl 6 in lego? )
22:19 pmichaud jnthn: yes, we can
22:19 * moritz_ would love to
22:19 jnthn \o/
22:19 pmichaud I was brainstorming earlier today how I can cross Perl 6 and Lego
22:19 masak not sure if this is praise or sharp criticism: http://www.formspring.me/halcy/q/965794626
22:19 dalek rakudo: 83b2cdf | masak++ |  (3 files):
22:19 lue .oO("Please sir, we need to see that lego brick. Is it... a 2x4 ?")
22:19 dalek rakudo: [Buf] worked on &pack, .unpack and .encode
22:19 dalek rakudo: * &pack and .unpack now exist and do simple things
22:19 dalek rakudo: * The directives they know about: A H C S L n N v V x
22:19 dalek rakudo: * .encode now recognizes its $encoding parameter
22:19 dalek rakudo: * It can handle utf-8 (default), latin-1, and ascii
22:19 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/83b2cdfa64becdef052417962cc114e38f5920d8
22:19 masak \o/
22:20 moritz_ \o/ indeed
22:20 pmichaud masak: I'd count it as praise.
22:20 pmichaud afk
22:20 jnthn masak++ # yay
22:21 jnthn masak: The pencil. You must soon lay it down.
22:21 jnthn ;-)
22:21 masak pmichaud: I've heard worse versions of it. a friend of mine relayed "well, they've taken all the modern programming concepts, an OO system, and all manner of nice stuff, and glued it... onto *Perl*"
22:22 masak jnthn: well, I plan to do the operators and then lay it down. I won't even need tomorrow, despite the deadline being 19:00 UTC.
22:22 jnthn I woudln't say we glued it on. It's more like whisked it in.
22:22 lue .oO[ this year's perseid meteor shower makes me want to find a comet whizzing by in December, and build a snowman to go with it :) ]
22:22 masak jnthn: which is good, because I have $WORK to do too :)
22:22 jnthn masak: Excellent.
22:23 jnthn masak: Yes, I have $dayjob to attend to tomorrow too, I suspect. :-)
22:23 masak lue++ # that's an AWESOME idea
22:23 masak lue: take a photo!
22:23 jnthn That was still my favorite ever RT ticket. :-)
22:24 masak jnthn: it'll surely go into my 1024 talk :)
22:25 lue .oO(find projected comet path, find 'P 6' constellation, make snowman, see comet,tilt the camera's left down, take picture.)
22:26 masak "Snowman-comet: a Match made in heaven"
22:27 hercynium joined #perl6
22:27 jnthn I still want to give a talk on Perl 6 grammars just so I can use that pun in a talk title. :-)
22:27 hercynium joined #perl6
22:27 kst joined #perl6
22:27 masak jnthn: please do!
22:30 tadzik Juerd: SYN
22:30 jnthn Maybe it should be the one that I do after "I KnowHOW to build a metamodel!"
22:31 lue rakudo: Doctor.WHO
22:31 p6eval rakudo c4b6df: OUTPUT«Could not find sub &Doctor␤  in main program body at line 22:/tmp/_uhYgWmQkD␤»
22:34 Tene hehe
22:34 Juerd tadzik: nack
22:35 tadzik Juerd: noticed my feather account request maybe?
22:35 Juerd tadzik: Yes
22:35 Juerd afk
22:35 lue prefix:<?> checks for defined-ness, right?
22:35 tadzik oh, ok
22:36 tadzik Juerd: fine, just up to this moment I still had a feeling that this ##### email address is a prank :)
22:37 lue rakudo: my $a = 3; say ?$a; say ?$b;
22:37 p6eval rakudo c4b6df: OUTPUT«===SORRY!===␤Symbol '$b' not predeclared in <anonymous> (/tmp/9N2f74jP8P:22)␤»
22:37 lue rakudo: my $a = 3; my $b; say ?$a; say ?$b;
22:37 p6eval rakudo c4b6df: OUTPUT«1␤0␤»
22:40 masak lue: no, it's just that "undefined" is one of the false values.
22:40 masak lue: 0 and '' would yield False as well.
22:41 lue here's another pun:  m/smart/  # or at least the beginnings of one
22:45 masak rakudo: say .perl given "foo".comb>>.ord >>+^<< "bar".comb>>.ord
22:45 masak don't ask :)
22:45 p6eval rakudo c4b6df: OUTPUT«[4, 14, 29]␤»
22:50 awwaiid joined #perl6
22:54 lue rakudo: my @a = 1,2,3; my @b = 4,5,6; say (@a «[+]» @b);  # what happens when you combine hyperops and reduction ops ?
22:54 p6eval rakudo 83b2cd: OUTPUT«579␤»
22:55 masak lue: the [+] parses as just +
22:55 masak lue: generally, in infix position, [op] parses as just op
22:55 lue darn.
22:56 masak std: »[+] 1, 2, 3
22:56 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus statement at /tmp/plSLueiyJS line 1:␤------> [32m<BOL>[33m⏏[31m»[+] 1, 2, 3[0m␤Parse failed␤FAILED 00:01 113m␤»
22:56 Tene I was a little bit disappointed earlier that I couldn't transform a lists of lists with .map([*] *) as short for .map({[*] @^a})
22:57 lue I guess the other way around ( [«+»] ) wouldn't do anything either?
22:58 * lue ponders how to do infinite cardinals in Perl 6
22:58 masak std: my @a; my @b; @a [«+»] @b
22:59 p6eval std 31912: OUTPUT«ok 00:01 115m␤»
23:01 lue rakudo:my @a = 1,2,3; my @b = 4,5,6; say [«+»] @a, @b
23:01 p6eval rakudo 83b2cd: OUTPUT«21␤»
23:02 * jnthn ponders how to do 1 pope in Perl 6
23:02 lue :)  .oO(what just happened?)
23:02 lue rakudo: my @a = 1,2,3; my @b = 9,8,7; say [«+»] @a, @b
23:02 p6eval rakudo 83b2cd: OUTPUT«30␤»
23:03 lue rakudo: my @a = 1,2,3; my @b = 4,5,6; say [«+»] @a, @b; say [+] @a, @b;
23:03 p6eval rakudo 83b2cd: OUTPUT«21␤21␤»
23:05 lue rakudo: say uc 0x2a
23:05 p6eval rakudo 83b2cd: OUTPUT«42␤»
23:07 masak testing -- ingy
23:07 masak testing -- thingy
23:07 ingy meh
23:07 ingy masak: I irssi always hilights thingy and stringy
23:08 ingy for me
23:08 mberends japhb: the OpenGL examples in http://cpansearch.perl.org/src/CHM/OpenGL-0.63_001/examples/ seemed like good candidates for trying out with Zavolaj, The large number of functions and named constants is daunting, however.
23:09 sorear ingy: what do you think of my p6take on Test::Builder?
23:10 ingy sorear: sorry, not there yet...
23:12 ingy sorear: ok, I got niecza_eval working
23:13 Tene The common mishilight in this channel for me is "flatTENEd"
23:16 ingy sorear: rebuilding niecza
23:16 ingy Tene: do you know the cure?
23:16 Tene ingy: Yes.
23:17 Tene ingy: I just don't care.  I find it a little entertaining when I get mishilights.
23:18 sorear ingy: I was actually expecting you to just skim the tile.
23:18 sorear file
23:20 ingy sorear: yeah, but if I'm going in there...
23:21 sorear also, several features are missing because I last touched Test.pm6 before I had arrays and hashes working
23:21 s1n joined #perl6
23:21 * sorear is reading the DPH papers trying to figure out if this can be translated to hyperops
23:22 mahdi joined #perl6
23:23 mahdi hi all
23:23 sorear hello
23:23 mahdi This is my first visit to this channel
23:23 sorear Welcome.
23:23 tadzik hello mahdi
23:23 mahdi thanks
23:23 mahdi hi :)
23:25 masak stop by anytime!
23:26 masak if only to say hi.
23:26 * sorear contemplates hacking his copy of Linux to simulate a multiprocessor by not allowing any thread to take more than 25% of timeslaces
23:26 ingy masak: did you get rid of the Makefile in the ufo repo?
23:27 ingy masak: I seem to remember make install-ing ufo
23:27 masak ingy: aye. ufo now self-hosts.
23:27 masak ingy: you can run ufo on ufo to get a Makefile in your ufo.
23:28 ingy you might want to document that
23:28 ingy masak: and a one line Makefile would do that :P
23:28 ingy well maybe 2 lines
23:29 masak ingy: I'll document it, when tuits present themselves.
23:30 sorear make sucks.  no way to get at the platform path separator.
23:31 ingy sorear: take it back, or I won't give you my review
23:31 ingy make is ingy's best friend for life
23:33 ingy > time ufo
23:33 ingy real0m13.363s
23:34 sorear make is great... I need to stop selectively remembering negatives
23:37 masak ingy: recent discussions about pure-p6 make alternatives have made me think about how to obviate ufo.
23:37 masak don't tell the aliens.
23:38 ingy sorear: Can't locate CompilerDriver.pm in @INC
23:38 ingy I see...
23:39 sorear the probability of me complaining about a piece of software is directly proportional to how often I have to use it
23:40 sorear ingy: trying to use it from outside the build dir?
23:41 sorear I haven't gotten around to handling that
23:41 sorear there are several different places where path search need to work
23:41 ingy sorear, masak: I tried this: http://gist.github.com/526092
23:41 ingy I could hack on ufo to better support other perl6 impls
23:42 sorear STD.pm6 wants to find syml/Test.pm6.syml, niecza wants to find Test_ast.store, gmcs wants to find Test.dll, mono wants to find Test.dll and Test.dll.so
23:42 ingy ufo is somewhat rakudo specific
23:42 sorear I'm not totally sure how I want to support cross-directory importing
23:43 ingy the --target=pir --output=blib/lib/TestML/Parser.pir part anyway
23:43 masak ingy: for now, ufo, is *intentionally* Rakudo-specific :)
23:43 ingy bah
23:43 ingy why?
23:43 sorear if you're ok with using the builtin NULL setting and are willing to install Kernel.dll into the mono system libraries folder, niecza can probably be made to work outside builddir easily
23:44 ingy I need to remember my promise to myself to not look at perl 6 for at least a week!
23:45 ingy I got temporarily sidetracked to play with p6 in mid-June!
23:45 ingy YOU BASTARDS!
23:45 masak ingy: because I know of no other implementation that needs a build system right now.
23:46 ingy I'm not sure what a build system has to do with running make test and make install
23:46 ingy I was pretty excited to use ufo to run a niecza make test on my modules
23:46 masak ingy: :)
23:46 ingy but I'll work on it next week
23:46 masak ingy: ok, depending on how non-invasive such a patch would be, I'd accept it.
23:47 ingy Python here I come!
23:47 pochi joined #perl6
23:47 ingy masak: have you seen me ever do anything invasive?!
23:47 ingy it's against my religion
23:48 masak ingy: Spiffy :)
23:48 ingy Spiffy never hurt anyone
23:48 ingy nor invaded anyone
23:49 ingy anyway Gloom is the new Spiffy
23:49 masak :)
23:49 ingy it's as tame as a pussy cat
23:50 jnthn Gloom?
23:50 jnthn Comes with a free Nirvana MP3 to help you be more gloomy!
23:51 ingy jnthn++
23:51 ingy jnthn: Gloom is the Great Little OO Module for p5
23:51 lue .oO(I don't want your freevil MP3s !)
23:51 ingy it was born yesterday
23:52 ingy after a 10 year pregancy
23:52 ingy more or less
23:53 ingy I'm about to do an IO::All release to CPAN. Looks like I've done one in 2004, 2006, 2008 and 2010
23:54 ingy IO::All is even
23:54 ingy even if some people think it's odd
23:55 tadzik :)
23:56 ingy sorear: Test.pm6 looks like a great start
23:56 ingy sorry for getting distracted...
23:56 ingy maybe we can try it in Rakudo
23:59 pugssvn r32005 | masak++ | [t/spec/S03-operators/buf.t] added
23:59 pugssvn r32005 |
23:59 pugssvn r32005 | For Rakudo, which now handles these operators.

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

Perl 6 | Reference Documentation | Rakudo