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