»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
Tene | rakudo: my @a = 1..10; say @a[*-1,*-2]; | 00:00 | |
p6eval | rakudo 924242: OUTPUT«109» | ||
Tene | rakudo: my @a = 1..10; say @a[map { *-$_ }, 1,2]; | 00:01 | |
masak | rakudo: my @a = 1..10; say ~@a[*-1,*-2] | ||
p6eval | rakudo 924242: OUTPUT«109» | ||
rakudo 924242: OUTPUT«10 9» | |||
TimToady | masak: re sets and hashes, that's exactly why sets are defined as special hashes with virtual values | 00:02 | |
masak | well, HashSet is. | ||
TimToady | and why sets and bags behave like lists in list context | 00:03 | |
the API is consistent for the immutables too | |||
masak | ok. | ||
TimToady | in the spec, anyway... | ||
masak | what does that mean in terms of sigils? can I declare a Set with a % sigil? | ||
it feels pretty natural to do .{} on a Set... | 00:04 | ||
TimToady | my %set of Set; or my %set := set(...) | ||
masak | oki, nice. | ||
TimToady | well, my %set of KeySet, if mutalbe | ||
*bl | |||
masak | *nod* | ||
TimToady | er s/of/is/ | 00:05 | |
masak | oh, good :) | ||
TimToady | KeySets are basically just set containers, since sets are immutable | ||
masak | std: set 1, 2, 3 | 00:06 | |
p6eval | std 625303c: OUTPUT«ok 00:01 121m» | ||
TimToady | so tweaking the membership generates a new set | ||
masak | std: bag "lady" | ||
p6eval | std 625303c: OUTPUT«ok 00:01 119m» | ||
masak | \o/ | ||
TimToady | rakudo: say set 1,2,3 | 00:07 | |
p6eval | rakudo 924242: OUTPUT«123» | ||
masak | rakudo: say set 1, "1" | ||
p6eval | rakudo 924242: OUTPUT«1» | ||
TimToady | oops :) | ||
masak | heh. | ||
it stringifies everything, IIRC. | |||
TimToady | yes, well, parrot doesn't really support OO keys yet, iiuc | 00:08 | |
but they should use === semantics, not eq | |||
masak | hm, it doesn't use a hash internally. it uses an array and uniq. | ||
wonder why it only retains one 1... | 00:09 | ||
TimToady | good think it's encapsulated :) | ||
masak | rakudo: say (uniq 1, "1").perl | ||
p6eval | rakudo 924242: OUTPUT«(1)» | ||
TimToady | because uniq uses a hash? | ||
masak | ah. | ||
is that what we expect of uniq? | |||
masak looks in the spec | |||
TimToady | no, I expect === semantics | ||
masak submits rakudobug | 00:11 | ||
TimToady | Cat.new("mitsy") and Dog.new("mitsy") are obviously two different critters | ||
masak | yap. | ||
'night, #perl6 | 00:19 | ||
TimToady | yap | ||
00:19
masak left
00:21
vmspb left
|
|||
sorear | nice, t0m is a Perl6er | 00:46 | |
00:55
stifynsemons left
00:57
jaldhar left
00:58
jaldhar joined
01:00
stifynsemons joined
01:04
guidjos joined
01:08
guidjos left
01:09
guidj0s_ joined
01:11
guidj0s_ left
|
|||
colomon | poop. If I'd spent another couple of hours working on p4, I'd have gotten seen the pattern repeat and fully cracked the problem. | 01:12 | |
s/gotten seen/reached/ | 01:19 | ||
01:21
justatheory left
01:24
risou_ left
01:40
flatwhatson_ left
|
|||
colomon | Well, for definitions of "fully cracked" that don't include proving I was doing the right thing. | 01:49 | |
01:57
coldhead left
02:00
benabik_away is now known as benabik
|
|||
diakopter | colomon: ping | 02:01 | |
colomon | pong | ||
diakopter | :D | ||
impromptu non-trivia quiz: | 02:02 | ||
what is a Perl 6 "Container Type" | |||
(anyone else feel free to respond/answer, of course) | 02:03 | ||
colomon | :) | ||
I'm not sure there is a formal definition. | |||
but, you know, Array or Hash. | |||
I believe there was a thought of having a formal Container role at one point, but no one could work out what it actually did. | 02:04 | ||
02:05
noganex left
|
|||
colomon | I could be completely wrong about the details, though. :) | 02:05 | |
diakopter reads the paragraphs mentioning 'container' in S09 and S12 | 02:06 | ||
02:06
noganex joined
|
|||
benabik | S10 appears to be using Container as a type in the def of CANDO | 02:07 | |
sorear | the CANDO stuff is completely wrong | 02:08 | |
diakopter | yay! someone can erase it! :) | ||
sorear | it hasn't made any sense since the last overhaul of the package system | ||
benabik | The spec being wrong makes things hard to follow. :-D | ||
02:10
coldhead joined
|
|||
benabik | S32/Containers also defines a Container role, which appears to be an marker role. | 02:10 | |
But all the usages in S02 and S09 appear to refer to "Array, Hash or similar" | 02:11 | ||
diakopter | it'd be cool if there was a link on each Text::SmartLinks page (the synopses on perlcabal.org) to each's revision history on github | 02:13 | |
TimToady | anything mutable is essentially a container | ||
diakopter | ok | 02:14 | |
is the perlcabal.org/syn/S32/Containers.html#Container up-to-date? | 02:15 | ||
also, is this fossilized as sorear says: perlcabal.org/syn/S10.html#Autoloading | 02:16 | ||
TimToady | a bit distracted at the moment... | ||
diakopter waits | |||
02:18
stifynsemons left
|
|||
diakopter takes up the mantle of recording sorear's off-hours irc questions for TimToady in a file in the github repo | 02:18 | ||
and others' | 02:19 | ||
colomon | diakopter: I would argue that the three functions assigned to Container are pretty useless as a role. | 02:21 | |
Errr... unless Hash is not supposed to be involved? It looks like the interface is strictly defined in terms of @ variables, lists, and arrays.... | 02:24 | ||
02:28
icwiener left
02:31
kst left
02:38
kst joined
|
|||
sorear | Array and Hash containers have much more in common with each other than with Scalar | 02:39 | |
if Scalar even exists | |||
colomon | but what can you do with a variable that is Array or Hash, other than treat one type as the other? | 02:48 | |
.elems, maybe. | 02:49 | ||
sorear | colomon: .iterator and .LISTSTORE | 02:52 | |
colomon | LISTSTORE? | 02:53 | |
.iterator makes sense, agreed. | |||
sorear | whatever you want to call the function that handles list assignment | 02:54 | |
colomon | you can do list assignment to a Hash? | 02:55 | |
(and I would have thought Container was supposed to read-only?) | 02:56 | ||
sorear | sure | ||
my %hash; %hash = a => 1, b => 2; | |||
colomon | ah, assigning a list of Pairs, sure. | 02:57 | |
good point. | |||
though that (liststore of Pairs) seems thin stuff for a Role, IMO. | 02:58 | ||
hmmm... you can call .elems and .iterator on a scalar too, can't you? | 02:59 | ||
rakudo: say 1.elems | |||
p6eval | rakudo 924242: OUTPUT«1» | ||
colomon | rakudo: say 1.iterators | 03:00 | |
p6eval | rakudo 924242: OUTPUT«Method 'iterators' not found for invocant of class 'Int' in main program body at line 22:/tmp/0A5wNvgfBA» | ||
colomon | rakudo: say 1.iterator | ||
p6eval | rakudo 924242: OUTPUT«Method 'iterator' not found for invocant of class 'Int' in main program body at line 22:/tmp/Rz95KVLGsL» | ||
colomon | okay, maybe not that one. | ||
03:04
f00li5h left
03:06
whiteknight left
03:08
rgrau left
03:10
justatheory joined
03:39
jaldhar left
03:40
jaldhar joined
03:52
zy3g0 joined
04:06
zy3g0 left,
jimbob joined
04:12
stifynsemons joined
|
|||
dalek | ecza: 64beb12 | sorear++ | / (3 files): Simplify handling of labelled control exceptions |
04:15 | |
sorear | True or false: A when statement must be the immediate child of a topicalizer block. | ||
04:20
benabik is now known as benabik_away
04:21
risou joined
04:26
Su-Shee left
04:28
Su-Shee joined
04:49
wiseguyxp_ joined
04:50
wiseguyxp_ left
04:51
wiseguyxp joined
05:04
felliott left
|
|||
snarkyboojum | o/ | 05:07 | |
sorear | hi! | 05:10 | |
05:13
risou left
|
|||
TimToady | sorear: false | 05:16 | |
succeed and proceed are just control exceptions (that can typically be optimized into goto) | 05:18 | ||
sorear | Why aren't succeed and proceed totally dynamic like next and last? | 05:19 | |
TimToady | next and last are totally dynamic in the absence of a label | ||
with a label they're lexotic | |||
I don't there's as much call for dynamic succeed, but certainly if you succeed in a scope without an outer topicalizer, dynamic is the only thing left to try | 05:20 | ||
sorear | I mean like next and last withou labels | ||
TimToady | it doesn't seem to me to be what the typical user would expect | 05:21 | |
we could, I suppose, allow LABEL.succeed for pure lexotic, and the implicit succeed would then lexotic as well | 05:22 | ||
an explicit succeed without a label could conceivably be dynamic | 05:23 | ||
but certainly it's not specced that way currently | |||
I think consistency with the loop policy has something to be said for it, as long as the implicit ones stay lexotic (even if there's no label) | 05:24 | ||
I wouldn't expect anyone to ever use LABEL.succeed, but consistency doesn't seem inachievable here | 05:25 | ||
unachievable even | 05:26 | ||
I'm not sure what LABEL.proceed would mean though | |||
presumably the label would be on the when that is being left | 05:27 | ||
05:27
envi joined
|
|||
TimToady | otherwise it's just a goto | 05:27 | |
snarkyboojum | phenny: tell masak, I particularly enjoyed the release "story" for yapsi this month :D | 05:28 | |
phenny | snarkyboojum: I'll pass that on when masak is around. | ||
TimToady | or maybe it uses the label of the whole structure to figure out which when to exit | ||
sorear | Is LABEL required to be able to identify the Block object? | ||
TimToady | a thing can be lexotic without a label, but then it's difficult to express intentional lexoticity | 05:29 | |
like return from a 'sub', which doesn't care about the subs name, only the keyword and the identity of the sub in question | 05:30 | ||
so I can also argue that succeed/proceed are always lexotic, and you can use $scope.leave to do anything else dynamically | 05:31 | ||
so it would be more like return, and less like last | 05:32 | ||
and, in fact, the proper way to implement succeed is more like return, so that it can return the value of the when block | 05:33 | ||
sorear | LOOP: for 1 { say ?( LOOP ~~ Code ) } # ?? | 05:34 | |
LOOP: for 1 { say ?( LOOP === &?BLOCK ) } # ?? | |||
TimToady | no | ||
it's just a label | |||
presumably you can ask it for the identity of the block in question though | |||
sorear | Is that necessary? I just noticed that the model of labels I've been working under doesn't allow it | 05:35 | |
TimToady | rakudo: LABEL: say LABEL.WHAT | 05:36 | |
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "LABEL: say"» | ||
sorear | rakudo doesn't do labels at all | ||
TimToady | pugs: LABEL: say LABEL.WHAT | ||
p6eval | pugs: OUTPUT«*** No such subroutine: "&LABEL" at /tmp/pUR53unwQV line 1, column 12 - line 2, column 1» | ||
TimToady | pugs: LABEL: for 1 { say LABEL.WHAT } | ||
p6eval | pugs: OUTPUT«*** No such subroutine: "&LABEL" at /tmp/MEgABLtd6j line 1, column 20-31» | ||
TimToady | I guess pugs doesn't either | ||
sorear | pugs: LABEL: goto LABEL; | ||
p6eval | pugs: OUTPUT«*** No such subroutine: "&goto" at /tmp/P_XSWEdhfd line 1, column 8-18» | ||
sorear | pugs: LABEL: while True { last LABEL; } | 05:37 | |
p6eval | pugs: OUTPUT«*** No such subroutine: "&LABEL" at /tmp/3Fvi56XQpp line 1, column 21-31» | ||
TimToady | how can you write a lexotic exception if you can't identify the correct frame to unwind to? | ||
sorear | The frame to unwind to is the OUTER:: of the block | 05:38 | |
TimToady | no | ||
that's like saying you can't return from inside an if | 05:39 | ||
that's why we invented lexoticness, so we can identify frames lexically | |||
and use that to capture the throw at the right palce | 05:40 | ||
*place | |||
sorear | No, that's not quite what I meant | ||
LOOP: loop { loop { last LOOP } } -> my $LOOP = Label.new(callframe, "LOOP"); "LOOP": loop { loop { last $LOOP } } | 05:41 | ||
the label doesn't hold a reference to the loop body | |||
if it did, it would prevent loop inlining in a lot of interesting cases | 05:42 | ||
TimToady | labels aren't strings; they're constants | 05:43 | |
sorear | my $LOOP = Label.new(callframe, 0); 0: loop { loop { last $LOOP } } # if you prefer | ||
I had planned to use names for debugging, but my model works with any unique identifier | 05:44 | ||
*debuggability | |||
TimToady | I don't see how knowing the outer callframe helps you know where to start up again with 'next' | 05:45 | |
the code performing the loop needs to know if the block passed in is the one referred to in the control exception it just caught | 05:46 | ||
so it's more the block needs to know its label | |||
sorear | the code performing the loop knows the label name | 05:47 | |
the exception is correct to catch if the frame matches the current frame, and the name matches | |||
TimToady | it will get the wrong one dynamically if it's scanning for names, and an inner loop has the same label; that's no good | 05:48 | |
sorear | it's not just scanning for names, it's also scanning for frames | ||
TimToady | it has to be a unique identity for the block, that the exception has got from the label used | ||
sorear | name,outerframe pairs are a unique identity for blocks | 05:49 | |
since the outer block only clones its children once | |||
and names are unique within the outer block | |||
TimToady | well, maybe name/outerframe the value of the label constant | 05:50 | |
but it ain't just a string | |||
sorear | aye | ||
TimToady | when you say LABEL.foo, it's got the lexotic identity, and when you say "LABEL".foo, you have to do it dynamically | 05:51 | |
(unless we let some things look up caller labels...) | 05:52 | ||
in which case the latter could behave lexotically, with the cooperation of .foo | |||
anyway, I suspect for optimizability it would be better if succeed defaults to lexotic | 05:54 | ||
then it has some change of turning into a low-level goto | |||
*chance | |||
which also makes me wonder if we've defaulted next and last the wrong way | 05:55 | ||
and we should have something explicit to indicate a dynamic throw | |||
"next if" is very heavily used in typical perl code | 05:56 | ||
sorear | actually I find dynamic to be easier to optimize | ||
TimToady | that seems counterintuitive to me | ||
PerlJam puts a next inside a nested sub 5 levels deep just for sorear | 05:57 | ||
sorear | there are 2 interesting cases | ||
case 1: next/etc is inside a pile of lexical scopes, with no extra dynamic scopes | 05:58 | ||
case 2: there are extra dynamic scopes | |||
in case 1, dynamic and lexotic can both be turned into a goto | |||
TimToady | I suppose the dynamic scope can make it easier to 'next' things like, say map | ||
sorear | in case 2, neither can because the dynamic scopes might have CONTROL blocks | ||
but dynamic is easier because it doesn't require creating label objects | 05:59 | ||
05:59
arlinius left
|
|||
sorear | I agree it's counterintuitive | 05:59 | |
it makes me think I'm attacking the problem entirely wrong | |||
TimToady | I think people will tend to write their own loops more than their own switches, but I suppose the argument can carry over there too | 06:00 | |
sorear | the main argument for lexicality of switchy stuff is that $_ is lexical | ||
TimToady | well, but for loops also set $_ | 06:01 | |
06:01
arlinius joined
|
|||
TimToady | it's not entirely clear whether we want to say that CONTROL blocks see exceptions that are lexotically aimed elsewhere; if we blinded them to that, then you case 2 becomes easier to optimize for lexotic scopes, since you can ignore dynamic CONTROL blocks | 06:03 | |
*your | |||
and really, anything you want to do on stack unwind should really be in something more like a LEAVE block | 06:04 | ||
so I'm not too scared to say that CONTROL blocks can be auto-skipped, unless there's a good use case for not doing so | 06:05 | ||
in that sense, it's really the identity of the CONTROL block that is at issue here | |||
06:06
dukeleto left
|
|||
TimToady | well, maybe that's oversimplified | 06:06 | |
06:06
dukeleto joined
|
|||
sorear | even a LEAVE block has issues | 06:06 | |
it requires a stack unwind | |||
TimToady | well, yes, that's the point of 'em | 06:07 | |
sorear | unwinding to a specific frame doesn't ring to me as much cheaper than unwinding to a frame with the "handles next" bit | ||
TimToady | the unwind should not be confused with the throw | ||
the unwind happens after the throw finds the right handler | 06:08 | ||
PerlJam | I sure wish I understood what you guys were talkling about. :-) | 06:11 | |
TimToady | for example, if a 'return' doesn't find its sub, it throws a new exception from the point of the return | ||
with the original frames still there | |||
sorear | PerlJam: last LABEL; | ||
PerlJam | Because "auto-skipping CONTROL blocks" makes me wonder how you exit out of nested blocks each with their own LAST semantics. | 06:12 | |
06:12
Su-Shee left
|
|||
TimToady | LASTs are processed more like LEAVE, it would seem | 06:12 | |
that is, on stack unwind, not on the control exception | 06:13 | ||
might imply that a stack unwind should be told the reason for unwinding | 06:14 | ||
dalek | ecza: 7742322 | sorear++ | src/ (3 files): Trap succeed in blocks that signature-bind $_ |
06:15 | |
TimToady | but again, a 'last' that doesn't find its loop frame as a control exception throws a real exception from the same deep frame instead (which is likely to unwind) | ||
sorear | TimToady: Have you seen t0m's TR18 post? | 06:16 | |
TimToady | exception of either kind never unwind; they only schedule an unwind after they've decide who handles the exception | ||
PerlJam | TimToady: and that "find" is lexical? | ||
TimToady | no, dynamic, which includes lexotic if there's a lexical identity to scan for | ||
but the scan is of necessity dynamic | |||
sorear: yes, I glanced at it, but haven't had a chance to reply | 06:17 | ||
it's probably worth someone taking a pass over to see how much the Perl vision and the Unicode vision have diverged over the last year or three | |||
in any case, most of what we've come up with we've done because it's the right thing to do, not because of a consortium report | 06:18 | ||
sorear | TimToady: What do you mean by last throwing a real exception? | ||
TimToady | a fatal exception to be caught by CATCH, not a control exception | ||
PerlJam | sorear: I parsed that as "non-CONTROL exception" | ||
sorear | "No handler for control exception last in dynamic scope" or so? | 06:19 | |
TimToady | control expections are conceptually similar, but we want a very lightweight implementation | ||
since they aren't, in fact, exceptional | |||
PerlJam | maybe they should be "control expectations" rather than "control exceptions" | 06:20 | |
TimToady | sorear: well, I'd put it into User-ese rather than Language-lawyer-ese, but yes | ||
You used a 'last' that wasn't in the dynamic scope of a loop; shame on you! | |||
I don't expect the casual use to know that 'last' throws a control exception | 06:21 | ||
this is one of those spots where it's important for budding programmers to do cargo-cult programming | |||
they can learn the exact semantics and technical terms later | |||
PerlJam | I've always gotten the impression that the dynamic nature of next/last/redo was surprising to most Perl 5 programmers. I bet that will continue to be the case with Perl 6. | 06:24 | |
TimToady | same deal with my "Useless use of [] around infix op" in my version of that patch; I don't think the newish user will understand "metaoperator brackets" | 06:26 | |
(it's not clear they are intrinsically tied to metaoperators in any case) | 06:27 | ||
(for instance, there's no metaoperator in the &[+] form, but I think of those as the same brackets) | |||
std: 1 [+] 42 | 06:28 | ||
p6eval | std 625303c: OUTPUT«ok 00:01 119m» | ||
TimToady | I guess it hasn't recompiled lately | ||
sorear | niecza: 1 [+] 42 | 06:29 | |
p6eval | niecza v2-10-g7742322: OUTPUT«Potential difficulties: Useless use of [] around infix op at /tmp/ItTwkZ8sAH line 1:------> 1 ⏏[+] 42» | ||
TimToady | :) | ||
or I guess it's using the CPAN viv? | 06:30 | ||
06:30
risou joined
|
|||
sorear | the last build attempt was successful (and last year) | 06:31 | |
TimToady | niecza: s{foo}{bar} | 06:32 | |
p6eval | niecza v2-10-g7742322: OUTPUT«===SORRY!===Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/zvTneNmG79 line 1:------> s{foo}⏏{bar}Parse failed» | ||
TimToady | aha, you didn't get that one yet :) | 06:33 | |
sorear | std is suspiciously absent from /chroot/var/spool/cron/crontabs/p6eval | 06:34 | |
06:34
arlinius left
|
|||
sorear | phenny: tell moritz_ std isn't in /chroot/var/spool/cron/crontabs/p6eval and the last std: update was Dec 16. Bug? | 06:34 | |
phenny | sorear: I'll pass that on when moritz_ is around. | ||
sorear | std: given 12 -> $x { } # Is this a topicalizer? | 06:37 | |
p6eval | std 625303c: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/FeqhRld8XY line 1:------> given 12 -> ⏏$x { } # Is this a topicalizer?ok 00:01 121m» | ||
TimToady | not in the sense of setting $_ | ||
used to be that way, till we deemed double binding insane | 06:38 | ||
it got particularly messy if there were multiple parameters; is $_ only an alias for the first one? | 06:40 | ||
took a long time to detangle invocants from topics too | 06:41 | ||
sorear | there's still mention of invocants in S04 | 06:42 | |
06:42
_ilbot joined
|
|||
sorear | I take it that's a fossil? it seemed odd. | 06:42 | |
TimToady | those look accurate to me, on first blush. .foo takes $_ outside, but inside it's the invocant | 06:43 | |
or was it a different place you're wondering about? | 06:44 | ||
sorear | S04:869 | ||
TimToady | inside, the topic and invocant are the same only if $_ is one of the formal parameters | ||
that seems consistent with what I just said | 06:45 | ||
dalek | ecza: 03bd80d | sorear++ | / (2 files): Implement "given" |
||
TimToady | method ($_: $a,$b,$c) {...} | ||
sorear | S04:869 seems to imply that method foo($x: $_) { } doesn't set the topic | 06:46 | |
TimToady | $_ is both invocant and topic there | ||
it should probably s/invocant/any of its parameters, including the invocant,/ | |||
06:47
molaf joined
|
|||
TimToady | in some sense $_ = 'foo' is a topicalizer too, but not as far as 'succeed' knows | 06:47 | |
it can really only know about sig bindings attached to a scope | 06:48 | ||
sorear | I get the feeling that Perl 6 once thought of "topic" as the master concept | ||
TimToady | succeed is really based on the topic container's identity, not the topic's contents... | 06:49 | |
sorear | whereas now $_ is master and "topic" just means "whatever is in the lexically visible $_" | ||
TimToady | $_ as an lvalue is the master now, and the actual topic is kind of epiphenomenal | 06:50 | |
so yeah | |||
the actual meaning of "it" is pretty sloppy in natural languages, even if you have official topicalization syntaxes | 06:52 | ||
sorear | (have I mentioned yet that I'm currently studying Japanese?) | 06:55 | |
TimToady | はい、そう分かりましたよ。 | 06:57 | |
06:58
arlinius joined
|
|||
sorear does not know what sou is doing there | 07:02 | ||
also, I seem to have lost my ability to type macrons since I restarted X earlier today | |||
TimToady | sou works much the same as in English, oddly | 07:03 | |
dalek | ecza: b0e8b22 | sorear++ | / (2 files): Implement postfix when and for |
||
TimToady | "so I have understood" | ||
sou often ends up as kinda meaning "that" when applied to an actoin | 07:06 | ||
*action | |||
そうします for instance | |||
be we also have "do so" in English | 07:07 | ||
*but | |||
diakopter | oddly and evenly | 07:10 | |
07:11
meteorjay left
|
|||
TimToady | std: にほんご: goto にほんご; | 07:14 | |
p6eval | std 625303c: OUTPUT«ok 00:01 118m» | ||
07:18
kaare_ joined
|
|||
diakopter | perlesque: にほんご: goto にほんご; | 07:18 | |
p6eval | perlesque: OUTPUT«(timeout)» | ||
diakopter | FTW | ||
sorear | TimToady: When you talk about "doing all your C coding in Perl 6", what do you have in mind? Linux loadable kernel modules? :) | 07:20 | |
diakopter would love more context there too | 07:23 | ||
TimToady | well, if we could write the filesystem in Perl 6, that might make it easier to support Unicode filenames. :) | 07:25 | |
interestingly, Clearcase's translucent filesystem was written in Perl 5 | |||
dalek | ecza: 4ebb175 | sorear++ | / (2 files): Implement block "when" |
07:26 | |
TimToady | it actually ran ten times faster than their C version of the code--go figure | ||
sorear | ok, niecza has given/when now | ||
that wasn't nearly so hard as I expected | |||
TimToady | and having failed to compile a Linux driver module earlier today, I'd certainly prefer to write one in Perl 6... | 07:27 | |
sorear | and this'll allow a few hundred more lines of STD diff noise to be removed | ||
sorear -> sleep | 07:28 | ||
TimToady | おやすみなさい! | ||
07:36
Chillance joined
07:39
wiseguyxp left
|
|||
szabgab | good morning | 07:51 | |
we are in the Perl dev room at FOSDEM on screen, just before the Perl 6 taslk | |||
rakudo: say "good morning" | 07:53 | ||
p6eval | rakudo 924242: OUTPUT«good morning» | ||
07:54
justatheory left,
justatheory joined
07:56
Mowah joined
|
|||
diakopter | hello screen | 07:57 | |
07:59
franckc joined,
tommie joined
|
|||
franckc | hi fosdem! | 07:59 | |
07:59
justatheory left
|
|||
tommie | :-D | 07:59 | |
szabgab | rakudo: say "good morning, frank" | ||
p6eval | rakudo 924242: OUTPUT«good morning, frank» | ||
08:00
awoodland joined,
AlviN900 joined
08:01
jeeger joined,
jonnie joined,
sawyer_ joined
|
|||
jeeger | rakudo: say [*] 1..10 | 08:01 | |
p6eval | rakudo 924242: OUTPUT«3628800» | ||
TimToady | rakudo: say (1, 1, * + * ... *)[^20].Str | 08:02 | |
p6eval | rakudo 924242: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765» | 08:03 | |
jeeger | rakudo: say 1..30».PERL | ||
p6eval | rakudo 924242: OUTPUT«Method 'PERL' not found for invocant of class 'Int' in main program body at line 22:/tmp/_iaorJwfyL» | ||
jeeger | rakudo: say 1..30».perl | ||
p6eval | rakudo 924242: OUTPUT«1» | ||
TimToady | precedence | ||
jeeger | rakudo: say 1..30»perl | ||
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "say 1..30\x{bb}"» | 08:04 | |
jeeger | hm | ||
diakopter | rakudo: say (0, 1, * + * ... *)[^20].Str | ||
p6eval | rakudo 924242: OUTPUT«0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181» | ||
jeeger | say (1..30)».perl | ||
TimToady | rakudo: say (1..30)».perl.Str | ||
p6eval | rakudo 924242: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30» | ||
jeeger | ah | ||
08:07
AlviN900 left
|
|||
TimToady | zzz & | 08:11 | |
08:12
risou left
08:13
Raven joined
|
|||
jeeger | rakudo: say 1 <= 35 | 08:14 | |
p6eval | rakudo 924242: OUTPUT«Bool::True» | ||
Raven | raduko: for(1,2,3,4,5) -> $x, $y? { say "$x, $y"; } | 08:15 | |
08:17
ecocode joined
|
|||
jeeger | rakudo: my @series = 1..Inf; say @series[-1]; | 08:21 | |
p6eval | rakudo 924242: ( no output ) | ||
Raven | raduko:for(1,2,3,4,5) -> $x, $y? { say "$x, $y"; } | 08:22 | |
jeeger | Raven: rakudo, not raduko | 08:23 | |
Raven | rakudo:for(1,2,3,4,5) -> $x, $y? { say "$x, $y"; } | 08:24 | |
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "for(1,2,3,"» | ||
Raven | ha, that explains why query did work | ||
jeeger | rakudo: say (1,2,3,4,5) -> $x, $y { say "$x, $y"; } | ||
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "say (1,2,3"» | ||
jeeger | rakudo: for (1,2,3,4,5) -> $x, $y { say "$x, $y"; } | 08:25 | |
p6eval | rakudo 924242: OUTPUT«1, 23, 4Not enough positional parameters passed; got 1 but expected 2 in <anon> at line 2:/tmp/2BoZpuOn_n in main program body at line 1» | ||
jeeger | rakudo: for(1,2,3,4,5) -> $x, $y { say "$x, $y"; } | ||
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "for(1,2,3,"» | ||
jeeger | hm, that looks like a bug | ||
Raven | yay for early morning bugfixes! | ||
08:33
RichiH_FOSDEM joined
|
|||
ecocode | approx 50 persons in Perl Devroom @ Fosdem. | 08:33 | |
RichiH_FOSDEM | shouldn't the topic say "p6eval usage"? | 08:34 | |
08:39
tommie left
|
|||
Raven | I love his @experssions | 08:41 | |
08:47
jeeger left,
awoodland left
|
|||
RichiH_FOSDEM | experss yourself | 08:47 | |
and at the end of the talk, he started telling us about ncurses ;) | 08:49 | ||
08:52
flatwhatson_ joined,
sunnavy joined
08:53
awoodland joined
|
|||
jdhore | quick question (since i'm in here) can you not put curly braces around an if statement if it only contains one line? | 08:58 | |
09:00
jimbob left
09:02
stifynsemons left
09:13
envi left,
sawyer_ left,
envi joined
09:20
awoodland left
|
|||
tadzik | jdhore: nope | 09:25 | |
you can use the FOO if BAR though | |||
rakudo: say "foo" if 5 < 7 | |||
p6eval | rakudo 924242: OUTPUT«foo» | ||
jdhore | ah | 09:27 | |
thanks | |||
09:48
ecocode left
09:49
ecocode joined
09:50
pmurias joined
09:51
ecocode left
10:00
cafesofie left
10:16
sunnavy left
10:17
sunnavy joined
10:48
zenog joined
|
|||
zenog | Stupid newbie question that unfortunately has not been answered by Google: What is wrong with the line "my %hash = map { $_ => $_ } @array;"? | 10:49 | |
tadzik | my @a = 1, 2, 3; my %hash = map { $_ => $_ } @a; %hash.perl.say | 10:53 | |
rakudo: my @a = 1, 2, 3; my %hash = map { $_ => $_ } @a; %hash.perl.say | |||
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "my %hash ="» | ||
tadzik | rakudo: my @a = 1, 2, 3; my %hash = map { $_ => $_ }, @a; %hash.perl.say | ||
p6eval | rakudo 924242: OUTPUT«Can't call map() with a Hash argument, Callable requiredYou probably wrote a Hash composer accidentally - try todisambiguate it with a ; directly after the opening brace in 'Any::map' at line 1511:CORE.setting in 'map' at line 1863:CORE.setting in main program body at | ||
..line … | |||
10:53
agentzh joined
|
|||
tadzik | sigh | 10:53 | |
rakudo: my @a = 1, 2, 3; my %hash = @a.map({ $_ => $_ }); %hash.perl.say | |||
p6eval | rakudo 924242: OUTPUT«Can't call map() with a Hash argument, Callable requiredYou probably wrote a Hash composer accidentally - try todisambiguate it with a ; directly after the opening brace in 'Any::map' at line 1511:CORE.setting in main program body at line 22:/tmp/aKiFU9Mkty» | 10:54 | |
10:55
f00li5h joined
|
|||
tadzik | I don't think hash is a list of pairs actually | 10:55 | |
moritz_ | map: {; $_ => $_ } | 10:56 | |
phenny | moritz_: 06:34Z <sorear> tell moritz_ std isn't in /chroot/var/spool/cron/crontabs/p6eval and the last std: update was Dec 16. Bug? | ||
moritz_ | sorear: yes, bug | ||
tadzik | moritz_: and that's a bug, above? | ||
zenog | tadzik: it has nothing to do with the %hash, "map { $_ => $_ } @array;" also fails. | 10:57 | |
moritz_ | tadzik: specbug | ||
tadzik | I see | ||
zenog: see the moritz_'s example | 10:58 | ||
10:58
masak joined
|
|||
masak | g'day, zebras. | 10:58 | |
phenny | masak: 05:28Z <snarkyboojum> tell masak I particularly enjoyed the release "story" for yapsi this month :D | ||
masak | :) | ||
it's a true story, by the way. my life is full of incidents where I lose my way. | 10:59 | ||
coldhead | is the Perl 6 And Parrot Essentials book still relevant/recommended (if that's not a rude question)? | 11:00 | |
masak | not a rude question. :) | ||
moritz_ | coldhead: it's very out of date | ||
zenog | tadzik: If it is a bug I'll just try a not-so-elegant workaround for now. Thanks. | 11:01 | |
masak | coldhead: I suppose something can be learned from it, but mostly it'll be something having to do with ancient history. | ||
moritz_ | it still gets some of the Perl 6 essentials across, but lots of details have changed | ||
coldhead | that was my fear, it seemed foolhardy to try to document it back then | ||
masak | coldhead: especially in retrospect... | ||
moritz_ | a nice way to write %h = map { $_ => $_ }, @a is %h = @a Z=> @a | 11:02 | |
coldhead | i might try it anyway. maybe it could be redeemed by an errata sheet | 11:03 | |
masak | ...a long errata sheet... | 11:07 | |
moritz_ | coldhead: I hope somebody already pointed you to "Using Perl 6"? | 11:08 | |
11:09
jaffa4 joined
|
|||
coldhead | they did but i liked the perl 6 + parrot option | 11:09 | |
jaffa4 | rakudo: $_ = 'foo'; s:g/ /a/; say 'alive' | ||
p6eval | rakudo 924242: OUTPUT«alive» | ||
jaffa4 | std: $_ = 'foo'; s:g/ /a/; say 'alive' | 11:10 | |
p6eval | std 625303c: OUTPUT«===SORRY!===Null pattern not allowed at /tmp/XkMjKRPuJf line 1:------> $_ = 'foo'; s:g/ ⏏/a/; say 'alive' expecting quantifierParse failedFAILED 00:01 122m» | ||
jaffa4 | Where is null pattern over there? I cannot see it. | ||
std: $_ = 'foo'; m:g/ /a/; say 'alive' | 11:11 | ||
p6eval | std 625303c: OUTPUT«===SORRY!===Null pattern not allowed at /tmp/TdwOVFDp1V line 1:------> $_ = 'foo'; m:g/ ⏏/a/; say 'alive' expecting quantifierParse failedFAILED 00:01 122m» | ||
masak | jedai: s:g/⏏/a/ | ||
argh, mistab again :/ | |||
jaffa4: the null pattern is where the ⏏ is. | |||
jaffa4 | there is space there. | ||
masak | jaffa4: whitespace is irrelevant in p6 regexes. | 11:12 | |
jaffa4 | ok | ||
11:14
dju left
|
|||
jaffa4 | Can I modify rakudo? | 11:14 | |
masak | please be more specific. | 11:15 | |
jaffa4 | Do I have the permissions to do so? | ||
Do I have the permissions of rakudo github to do so? | |||
11:18
dakkar joined
|
|||
moritz_ | jaffa4: nope. But you can fork and submit pull requests, or submit patches via RT | 11:18 | |
good morning btw | |||
masak | mornin', moritz_ | ||
moritz_ | we had a great (late) burns supper yesterday night | ||
and there's a portion of Stickey Toffee Pudding in the fridge :-) | 11:19 | ||
coldhead | wee muckle kilty tehk the glen! | 11:20 | |
jaffa4 | How do you debug rakudo? | 11:25 | |
Do you use some tools? | 11:26 | ||
tadzik | jaffa4: what do you mean "debug rakudo"? | 11:29 | |
jaffa4 | perl -d? | ||
I mean are there some debugging switches or settings? | 11:30 | ||
moritz_ | there's the --target switch which lets you see intermediate code | ||
and --ll-backtrace | |||
see docs/running.pod | |||
tadzik | use Devel::Trace also | ||
11:32
zenog left
11:39
coldhead left
|
|||
colomon | jaffa4: lots and lots of "say" statements. | 11:53 | |
jaffa4 | I mean the rakudo compiler | ||
colomon | jaffa4: so did I. | 11:54 | |
tadzik: | |||
rakudo: my @a = 1, 2, 3; my %hash = @a Z=> @a; %hash.perl.say # just in case you actually were looking for how to do that. :) | 11:55 | ||
p6eval | rakudo 924242: OUTPUT«{"1" => 1, "2" => 2, "3" => 3}» | ||
masak | jaffa4: when developing things for src/core, it's often best to do it in a standalone file first, and only later integrate it. keeps the development cycle short. | 11:57 | |
jaffa4 | What standalone file? | ||
moritz_ | a .pl file | 12:00 | |
masak | a script file that you write, instead of starting by integrating things into src/core | ||
moritz_ | colomon: re Z=>, I proposed that two hours ago too :-) | ||
jaffa4 | How could I extract a part from the whole without breaking the whole? | ||
colomon | moritz_: sorry, sketchy half-awake backlogging. ;) | 12:01 | |
moritz_ | jaffa4: en.wikipedia.org/wiki/Jenga | ||
masak | jaffa4: the parts of src/core are relatively independent. in the cases where they aren't, it can get tricky. but often it's solvable even then. | 12:02 | |
12:07
franckc left
12:12
MayDaniel joined
|
|||
moritz_ | to be more precises, things in src/core are not needed while compiling rakudo, other parts of rakudo only depend on them at run time | 12:13 | |
so if you supply the missing parts at run time, it's all good | |||
tadzik | sounds like the day to merge metainfo | ||
12:20
Chillance left
|
|||
tadzik | bah. While JSON parses for 40 seconds, storing the .perl string and evaling it later takes 17 seconds | 12:28 | |
not much better, but still, 23 seconds less for installing a module | 12:29 | ||
maybe sqlite is the way then... bleh | |||
masak | tadzik: 17 seconds -- that sounds... unreasonable. | 12:30 | |
colomon | very unreasonable | 12:34 | |
can you paste the .perl string to a gist? | |||
tadzik | si | 12:37 | |
gist.github.com/raw/813345/c328fe1...jects.perl | 12:38 | ||
maybe the cpanm way is the way: fetching the metainfo every single time from a web service. But it's nothing but a workaround for the Rakudo slowness | 12:39 | ||
12:40
yarp joined
12:41
whiteknight joined
|
|||
tadzik | I wonder how niecza... ah, no eval | 12:43 | |
12:45
dakkar left
12:51
dakkar joined
12:57
agentzh left
13:15
kfo_ joined
13:18
kfo left,
jeeger joined
|
|||
jeeger | Greetings! I'm still looking on how to do something like "@a Z @b Z @c", but with extending the lists. | 13:19 | |
masak | jeeger: extending the lists with what? | 13:20 | |
jeeger | masak: repeating them, for example, like @a <<,>> @b would | 13:21 | |
masak | I seem to recall the spec has something to say about this. hold on. | ||
13:23
felliott joined
|
|||
masak | ah, S32/Containters:101: "The C<zip> function defaults to stopping as soon as any of its lists is exhausted. This behavior may be modified by conceptually extending any short list using C<*>, which replicates the final element." | 13:23 | |
rakudo: sub repeat(@list) { gather loop { take $_ for @list } }; my @alpha = 'a' .. 'z'; my @digits = 0..9; say @alpha Z repeat(@digits) | 13:26 | ||
p6eval | rakudo 924242: OUTPUT«a0b1c2d3e4f5g6h7i8j9k0l1m2n3o4p5q6r7s8t9u0v1w2x3y4z5» | ||
masak | \o/ | ||
jeeger | rakudo: @numbers,* Z @letters | 13:27 | |
p6eval | rakudo 924242: OUTPUT«===SORRY!===Symbol '@numbers' not predeclared in <anonymous> (/tmp/4cjm9bIaPO:22)» | ||
jeeger | rakudo: say (1,2,3,4,*) Z ("one","two","three","four","five") | ||
p6eval | rakudo 924242: OUTPUT«1one2two3three4four4five» | ||
jeeger | aha! | ||
rakudo: say (1,2,3,4,Any()) Z ("one","two","three","four","five") Z | 13:28 | ||
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "say (1,2,3"» | ||
jeeger | rakudo: say (1,2,3,4,undef) Z ("one","two","three","four","five") Z | 13:29 | |
p6eval | rakudo 924242: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, *.notdef as a matcher or method, Any:U as a type constraint or | ||
..fail() as a failur… | |||
arnsholt | You've got a trailing Z | ||
masak | Perl 6 doesn't have an undef. | ||
jeeger | rakudo: say (1,2,3,4,undef) Z ("one","two","three","four","five") | ||
p6eval | rakudo 924242: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, *.notdef as a matcher or method, Any:U as a type constraint or | ||
..fail() as a failur… | |||
jeeger | Yeah, that was a quite exhaustive error message | ||
(for once^^) | |||
masak | :) | ||
jeeger | rakudo: say (1,2,3,4,Mu()) Z ("one","two","three","four","five") | 13:30 | |
p6eval | rakudo 924242: OUTPUT«Could not find sub &Mu in main program body at line 22:/tmp/hFSgS8xjcY» | ||
jeeger | Okay, I'll take this to a query | ||
masak | it's Mu, not Mu() | 13:31 | |
jeeger | That's what I'm trying now^^ | ||
13:44
REPLeffect left
13:50
jeeger left,
jeeger joined,
Axius joined
13:59
yarp left,
jeeger left,
REPLeffect joined
|
|||
masak | std: sink | 14:13 | |
p6eval | std 625303c: OUTPUT«===SORRY!===Bogus statement at /tmp/prQVAhS8Ix line 1 (EOF):------> sink⏏<EOL>Parse failedFAILED 00:01 119m» | ||
14:13
orafu left
|
|||
masak | std: sink say "OH HAI" | 14:13 | |
p6eval | std 625303c: OUTPUT«ok 00:01 120m» | ||
masak | rakudo: sink say "OH HAI" | ||
p6eval | rakudo 924242: OUTPUT«OH HAI» | ||
masak | \o/ | ||
14:15
cotto left
14:16
Axius left
|
|||
masak | TimToady: $obj.?foo returns Nil if there's no .foo method in the WALK chain. what about $obj.*foo? S12 doesn't seem to say. | 14:23 | |
masak checks roast | 14:24 | ||
xinming_ | do -> $x { $x.say } <--- How do we provide the arg for $x in this case? | 14:26 | |
14:26
drbean left
|
|||
xinming_ | do (-> $x { $x.say })(1) Got it. | 14:27 | |
masak | rakudo: -> $x { $x.say }(1) | ||
p6eval | rakudo 924242: OUTPUT«1» | ||
masak | no need for 'do' or parens. | ||
xinming_ | I was thinking that how to pass arg to do block. | 14:28 | |
Since we can have positional arg | |||
there | |||
do { say $^x }; This | 14:29 | ||
14:30
Hackbinary joined
|
|||
masak | there's not really any such thing as a "do block". | 14:30 | |
there's the "do" keyword, and then there's blocks. | |||
rakudo: do say 42 | 14:31 | ||
p6eval | rakudo 924242: OUTPUT«42» | ||
masak | rakudo: do do do do say "doo-diddly-do" | ||
p6eval | rakudo 924242: OUTPUT«doo-diddly-do» | ||
masak | rakudo: do do do do my $ = { say "not executed" } | 14:32 | |
p6eval | rakudo 924242: ( no output ) | ||
masak | rakudo: do do { say "immediate block" } | ||
p6eval | rakudo 924242: OUTPUT«immediate block» | ||
xinming_ | hmm, Got it, I think I need to think more about this. | ||
masak | xinming_++ | 14:33 | |
14:33
xinming_ is now known as xinming
|
|||
xinming | xinming, not xinming_ :-) | 14:33 | |
please ++ again. :-P | |||
The synopsis now is quite different from what I read last time. | |||
masak | xinming++ | 14:35 | |
yes, synopses tend to behave that way. | |||
from the bright side, the changes are either improvements, or the change before the improvement :P | 14:36 | ||
xinming | When I read the synopsis, I found perl 6 maybe abit over complicated. | 14:37 | |
Which made me think, How to implement such a language. :-) | |||
moritz_ | we've been asking that ourselves for some years now. | ||
:-) | |||
xinming | Though, Design direction is consistent. | ||
moritz_ | but we've made progress | 14:38 | |
xinming | yes, a great progress, I am trying rakudo these days. | ||
too much to learn, But I believe perl 6 will be the programming language in last 30 yearts. :-P | 14:39 | ||
A bit like perl 5 released in last century. | |||
masak | Perl 6 is a connaisseur language, for people with great taste. | 14:41 | |
14:41
dakkar left
|
|||
masak | rakudo: say Nil.elems | 14:43 | |
p6eval | rakudo 924242: OUTPUT«0» | ||
masak | where the spec is implicitly undecided on what .*foo returns when there's no .foo, roast is *explicitly* indecisive. interesting. | 14:44 | |
it just says "empty list", which might be () or Nil. | |||
it doesn't have a test for the definedness of the value. | |||
masak adds a test | |||
14:46
dakkar joined
|
|||
masak | rakudo: class A {}; A.new.+foo; say 'alive' | 14:48 | |
p6eval | rakudo 924242: OUTPUT«Could not invoke method 'foo' on invocant of type 'A()' in main program body at line 22:/tmp/E3axhhS400» | ||
masak | rakudo: class A {}; A.new.*foo; say 'alive' | ||
p6eval | rakudo 924242: OUTPUT«alive» | ||
masak | rakudo: class A {}; say A.new.*foo.perl | 14:49 | |
p6eval | rakudo 924242: OUTPUT«()» | ||
dalek | ast: 63157bc | masak++ | S12-methods/calling_sets.t: [S12-methods/calling_sets.t] made test more precise .*foo when there's no .foo is now tested to give not only the empty list (), but Nil, just like .?foo |
14:50 | |
14:53
jferrero left
14:57
sji joined
|
|||
jaffa4 | rakudo: m/hello/; | 15:05 | |
p6eval | rakudo 924242: OUTPUT«Method 'match' not found for invocant of class '' in main program body at line 22:/tmp/sjOqeFwzl5» | ||
15:05
cafesofie joined
|
|||
jaffa4 | rakudo: /hello/; | 15:07 | |
p6eval | rakudo 924242: ( no output ) | ||
jaffa4 | rakudo: m/hello/; | ||
p6eval | rakudo 924242: OUTPUT«Method 'match' not found for invocant of class '' in main program body at line 22:/tmp/sFNaRD0_w5» | ||
jaffa4 | rakudo: :m/hello/; | 15:08 | |
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near ":m/hello/;"» | ||
masak | jaffa4: the difference is that /hello/ is a (Regex) object, but m/hello/ is an operation. | ||
jaffa4: there's nothing like :m/hello/, and I don't know what made you think there is. | |||
15:09
jferrero joined
|
|||
jaffa4 | Is it possible to change / as a separator? | 15:09 | |
masak | rakudo: $_ = "heffo"; s!ff!ll!; say $_ | 15:10 | |
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "s!ff!ll!; "» | ||
masak | hm. | ||
masak checks S05 | |||
sorear | good * #perl6 | 15:12 | |
masak | o/ sorear | ||
std: s!ff!ll! | 15:13 | ||
p6eval | std 625303c: OUTPUT«ok 00:01 119m» | ||
masak submits rakudobug | |||
jaffa4: so, the answer seems to be "yes, it should be possible to use a separator other than '/', but Rakudo doesn't allow that yet". | |||
jaffa4 | right | 15:15 | |
dalek | kudo: 684fdf8 | masak++ | src/glue/dispatch.pir: [src/glue/dispatch.pir] .*foo returns Nil, not () |
||
15:22
sji left
|
|||
jaffa4 | $*key is like local, right? | 15:25 | |
sorear | right. | 15:27 | |
in terms of usage, anyway | |||
15:27
shi joined
15:28
wamba joined
|
|||
TimToady | I'm not sure that Nil is correct for something that is expected to return a list | 15:30 | |
shower & | |||
masak | hm. it feels odd to me that there'd be an inconsistency between .?foo and .*foo | 15:32 | |
we care enough about the *consistency* between /<foo>?/ and /<foo>*/ to package the former into an array. | |||
(despite the overhead and confusion that creates) | 15:33 | ||
jaffa4 | !paste | 15:43 | |
?paste | |||
tadzik | phenny: paste? | 15:44 | |
jaffa4 | What does this mean <quote_EXPR: ':qq'>? | 15:45 | |
15:46
mikehh joined
|
|||
moritz_ | it calls the method quote_EXPR on the Curosr with argument ':qq' | 15:48 | |
15:48
dakkar left
|
|||
jaffa4 | You mean rule? | 15:49 | |
sorear | Rules are just one kind of method | 15:50 | |
masak | ...in the OO inheritance sense, even. | 15:56 | |
moritz_ | in any kind of sense, really | 15:57 | |
15:58
dakkar joined
|
|||
sorear is doing s!!! for niecza now | 15:59 | ||
jaffa4 | rakudo: $e~~s//g/; | ||
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "$e~~s//g/;"» | ||
moritz_ | sorear: if you figure out sane semantics for return value and $/ setting for s/// I'd like to steal that for rakudo :-) | ||
16:00
pmurias left
|
|||
sorear | moritz_: What's the problem with the return value ? | 16:00 | |
jaffa4 | rakudo: $e~~s://g/; | ||
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "$e~~s://g/"» | ||
masak | ...also, the problem with $/ in .subst blocks... | ||
jaffa4 | rakudo: $e~~s:/ /g/; | ||
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "$e~~s:/ /g"» | ||
16:00
vmspb joined
|
|||
jaffa4 | rakudo: s:/ /g/; | 16:00 | |
p6eval | rakudo 924242: OUTPUT«===SORRY!===Confused at line 22, near "s:/ /g/;"» | ||
sorear | jaffa4: might I suggest declaring your variables? | ||
std: $e~~s//g/; | 16:01 | ||
p6eval | std 625303c: OUTPUT«===SORRY!===Variable $e is not predeclared at /tmp/vwaCvtG6bh line 1:------> $e⏏~~s//g/;Null pattern not allowed at /tmp/vwaCvtG6bh line 1:------> $e~~s/⏏/g/;Parse failedFAILED 00:01 120m» | ||
masak | jaffa4: even if you fix the variable, you shouldn't try to use the null pattern. | ||
jaffa4: the null pattern isn't allowed in Perl 6 regexes. we talked about that yesterday. | |||
jaffa4 | yes, that is clear | ||
masak | good. | 16:02 | |
sorear | niecza: s:pos(1)/x/y/ | 16:04 | |
p6eval | niecza v2-13-g4ebb175: OUTPUT«===SORRY!===Action method sibble not yet implemented at /tmp/pxxMlS6fwj line 1 (EOF):------> s:pos(1)/x/y/⏏<EOL>Action method quote:s not yet implemented at /tmp/pxxMlS6fwj line 1 (EOF):------> | ||
..s:pos(1)/x/y/⏏<EOL>Unhan… | |||
16:06
cafesofie left
|
|||
jaffa4 | Am I right that recompiling rakudo is slow? | 16:08 | |
sorear | yes | ||
jaffa4 | more than 2 minutes. | 16:09 | |
masak | oh, probably on most platforms. | ||
sorear | I've had it take 600 on me | ||
masak | especially core.pir is slow. | ||
sorear | the fastest I've seen is 8 | ||
jaffa4 | 8? | ||
8 what? | |||
sorear | minutes | ||
600 was also in units of minutes | 16:10 | ||
xinming | Why will $hash = { "a" => 1, $b, $c, %stuff, @nonsense }; be hash, but $code = { "a" => 1, $b, $c, %stuff, @_ }; will be parsed as code? | ||
jaffa4 | 600 minutes? | 16:11 | |
or rather seconds? | |||
sorear | 10:10 < sorear> 600 was also in units of minutes | ||
xinming | jaffa4: seconds. | ||
sorear | xinming: because the latter block has an implicit parameter | ||
xinming: wrong, minutes | 16:12 | ||
xinming | sorear: So, you mean, with $_, @_, %_ will cause the {} be parsed as block? | ||
sorear | yes. | ||
xinming | Thanks, A bit strange for the first glance. :-) | 16:13 | |
jaffa4 | what is <?[/]>? | ||
sorear | It's always parsed as a block - there's a postprocess that turns parameter-less blocks consisting of a single list of items, the first of which is a pair constructor or %-variable | 16:14 | |
jaffa4: Is the next character /? Zero width assertion | |||
Like <?before '/'>, but faster on nqp-rx | |||
16:14
Patterner left
|
|||
moritz_ | sorear: what should s/// return? | 16:15 | |
jaffa4 | rakudo: "//"~~m/'/' \s* '/'/ | 16:16 | |
p6eval | rakudo 924242: ( no output ) | ||
16:17
Psyche^ joined,
Psyche^ is now known as Patterner,
envi left
|
|||
masak | moritz_: irclog.perlgeek.de/perl6/2011-01-13#i_3184316 | 16:22 | |
sorear wonders if smartmathing against * should be more like .so | |||
masak | sorear: then what would replace the old * behvaior? | 16:23 | |
sorear: ~~ Any ? | |||
um. ~~ Mu ? | |||
sorear | True | 16:24 | |
moritz_ | masak: did you spec that (return value of s///)? | ||
masak | sorear: that's currently syntactically disallowd because people misunderstand it. | ||
moritz_: no. | |||
I could, though. | |||
sorear | masak: that's problematic from a p5 consistency viewpoint | ||
moritz_ | masak: it's not disallowed, it just warns | 16:25 | |
masak | ok. | ||
sorear | if $string ~~ s/.../.../ { is idiomatic | ||
moritz_ | and rakudo treats all compile time warnings as errors | ||
sorear | (and used in STD) | ||
moritz_ | well, then returning $string on success is unreliable | ||
sorear | so I'd rather have s/// return true iff there was a substitution | ||
moritz_ | fwm too | ||
sorear | right. p5 idioms breaking is fine, having them become slightly unreliable is BAD | 16:26 | |
moritz_ | erm, wfm | ||
masak | I think it works for me as well, but I'll need to ponder it a bit more. | ||
moritz_ | so s/// becomes do { $_ = $_.match; so $/ } ? | ||
masak | it does simplify the 'while s/.../.../' case. | ||
moritz_ | uhm | 16:27 | |
masak | moritz_: well, .subst | ||
moritz_ | *danger alert* | ||
while s:g/.../../ will behave quite differently than in Perl 6 | |||
thing is, people sometimes want to access the captures from the substituion | 16:28 | ||
sorear | according to perlre, s/// returns the number of substituions made | ||
always | |||
moritz_ | so they want something like for s:g/.../.../ -> $/ { say $0 } | ||
sorear | so I think I'll just use that in niecza | 16:29 | |
moritz_ | somehow I feel we can't make it right for everybody | ||
jaffa4 | Who should I sent a patch? | ||
moritz_ | jaffa4: [email@hidden.address] | ||
with [PATCH] + description in the subject | 16:30 | ||
masak | I'd rather see we tried to work out something consistent than try to please everybody. | ||
moritz_ | does s:g[foo] = do { .... } loop the RHS automagically over all matches? | ||
I think so | 16:31 | ||
jaffa4 | what about the web interface? | ||
moritz_ | so that would replace the old while(s///g) { ... } idiom | ||
jaffa4: what about it? | |||
masak | jaffa4: there's no way to submit patches through the web interface. | ||
jaffa4 | that is weird. | 16:32 | |
masak | I suggest you try to live with it. :) | ||
moritz_ | you are entitled to that opinion. | ||
jaffa4 | thanks for understanding. | 16:33 | |
masak | anytime. | ||
jaffa4 | well, mail sent. | 16:36 | |
masak | jaffa4++ | 16:38 | |
16:42
kjeldahl left
|
|||
dalek | p-rx/nom: 57d4969 | moritz++ | build/Makefile.in: missing dependency on nqp-builtins.pir |
16:47 | |
p-rx/nom: e778745 | moritz++ | / (2 files): add skip() builtin to avoid test-out-of-sequence for skipped tests |
|||
moritz_ | this makes the test summary in nom a bit smaller :-) | 16:48 | |
16:48
Ultali joined
16:50
Sarten-X left
16:51
araujo joined
16:55
Ultali left
16:56
Sarten-X joined
|
|||
jnthn | evening, #perl6 | 16:57 | |
masak | jnthn! \o/ | ||
jnthn | masak! \o/ | ||
moritz_: Thanks for taking care of the smartmatch.t mess. :) | 16:58 | ||
sorear | hello jnthn! | 16:59 | |
jnthn | o/ sorear | 17:01 | |
moritz_ | jnthn: no problem | ||
it was the lowest hanging fruit of all the test failures :-) | |||
jnthn | :) | ||
Yes, the others are harder targets. :) | 17:02 | ||
masak | jnthn++ # line numbers on errors in Rakudo | ||
tadzik | what, where? | ||
jnthn | masak: Huh? I did those ages ago :P | ||
masak | nevertheless :) | ||
17:02
risou joined
|
|||
masak | they're *really* convenient. | 17:02 | |
jnthn | .oO( Some features are a subscription program for karma ) |
||
masak | exactly. | 17:03 | |
17:18
justatheory joined
17:26
Su-Shee joined
|
|||
Su-Shee | good evening all. | 17:26 | |
masak | evening, Su-Shee | ||
sorear | hello Su-Shee | 17:27 | |
jnthn | o/ Su-Shee :) | 17:28 | |
Su-Shee | how's the fosdem going for perl6? :) | 17:29 | |
dalek | ecza: 6d45faa | sorear++ | / (2 files): Add &succeed and &proceed |
17:35 | |
ecza: f9417bc | sorear++ | / (3 files): Implement substitutions |
|||
sorear | moritz_: check the tests for f9417bc and see if there's anything interesting there | 17:36 | |
17:36
benabik_away is now known as benabik
|
|||
benabik | o/ | 17:36 | |
masak | benabik: \o | 17:38 | |
17:43
icwiener joined
17:47
mauror joined
17:48
wamba left
17:51
stifynsemons joined
17:52
mauror left
|
|||
moritz_ | sorear: nice, but nothing really unexpected | 17:52 | |
17:52
cafesofie joined
|
|||
diakopter | perl6: say Str | 17:55 | |
p6eval | pugs: OUTPUT«Str» | ||
..rakudo 684fdf: OUTPUT«Str()» | |||
..niecza v2-13-g4ebb175: OUTPUT«» | |||
TimToady | masak: actually, I'm starting to think that ? in regex should return Nil for 0 matches, but * shouldn't | 17:56 | |
so I think the reasoning should go the other direction | 17:57 | ||
masak | ok. | ||
diakopter | so | ||
TimToady | Nil is a useful value for the boundary between scalarness and listness | ||
and ? items are perceived both ways | |||
masak | aye. | 18:01 | |
dalek | ecs: a56ffc3 | larry++ | S (2 files): make ?/* semantics consistently Nil/() |
18:09 | |
TimToady | rakudo: 'x' ~~ /(y)? (z)*/; say $0.defined, $1.defined; | 18:11 | |
p6eval | rakudo 684fdf: OUTPUT«Bool::TrueBool::True» | ||
TimToady | that should be False True | 18:12 | |
by the new rules | |||
masak submits rakudobug | |||
TimToady | and actual, the first was supposed to be False already by the old spec | ||
*ly | |||
masak | rakudo: 'x' ~~ /<alpha>?/; say $<alpha>.WHAT | 18:14 | |
p6eval | rakudo 684fdf: OUTPUT«Array()» | ||
masak | TimToady: so this should be Match now? | ||
TimToady | no, it's still a list | 18:15 | |
masak | so... always Nil or a list of one item? | ||
jnthn | TimToady: (by the old spec) how? An empty list is defined? | ||
TimToady | we just mark the 0 case as undefined rather than defined | ||
jnthn | Or did that change also? | ||
TimToady | rakudo: say ().defined | ||
p6eval | rakudo 684fdf: OUTPUT«Bool::True» | ||
TimToady | rakudo: say Nil.defined | 18:16 | |
p6eval | rakudo 684fdf: OUTPUT«Bool::False» | ||
TimToady | that is correct | ||
jnthn | *nod* | ||
masak | TimToady: when $obj.?foo succeeds, it doesn't return a list of one item. | ||
TimToady | *shrug* | ||
jnthn | So if (y)? by the old spec gave back and empty list, then .defined on it shoulda been true, as Rakudo has it? | 18:17 | |
TimToady | old spec said Nil for that | ||
jnthn | oh | ||
TimToady | it just didn't specify that * returned () | ||
jnthn | ah, OK | 18:18 | |
I misunderstood what had changed. | |||
TimToady | it's possible we can relax /x?/ to not return a list now that Nil and () are different | 18:19 | |
esp if .[0] is a no-op on scalars | 18:20 | ||
rakudo: say 1.[0] | 18:21 | ||
p6eval | rakudo 684fdf: OUTPUT«1» | ||
TimToady | so again, where .?meth and x? are inconsistent, it's probably the regex that wants to change | 18:22 | |
I'd like to let pmichaud++ comment on that notion first though | |||
18:22
stifynsemons left
|
|||
masak | it's been proposed before. | 18:25 | |
TimToady | it makes more sense now that we have the Nil/() distinction | ||
18:26
dual left
|
|||
TimToady | the main difference is +$0 would do something different | 18:26 | |
masak | I'd never do that on <rule>? anyway. I'd do ?$0 | 18:27 | |
TimToady | rakudo: say +Nil | ||
p6eval | rakudo 684fdf: OUTPUT«0» | ||
TimToady | arguably, +Nil should warn, while +() shouldn't | ||
because the idea of Nil is that there's a least one less value than you expected | 18:28 | ||
which is why listy things return () instead, if 0 items is permissable | 18:29 | ||
Nil is the absence of an expected value | |||
masak | aye. | 18:30 | |
TimToady | (ignoring the fact that using the ? quantifier means you are expecting 0 values :) | ||
masak | was just going to say that :P | 18:31 | |
18:38
dual joined
18:43
cspencer joined
|
|||
dalek | kudo: 9898837 | pmichaud++ | src/Perl6/Actions.pm: Fix RT #83420; statement_control:<if> returns Nil if no else clause given. |
18:44 | |
jnthn | yay pmichaud++ patch! | 18:45 | |
masak | \o/ | 18:48 | |
18:50
cotto joined
18:54
Raven left
|
|||
sorear | TimToady: would it be ok for Nil !~~ Any? | 18:56 | |
S02 talks about magical behavior for assigning Nil to variables | |||
I don't like magical assignment behavior unless it can be done in the type check slow path | |||
(c.f. Parcels) | |||
masak somehow likes Nil !~~ Any | 18:57 | ||
"it's not even anything!" | |||
moritz_ installs a cronjob for std rebuilding on p6eval | 19:09 | ||
colomon | moritz_++ | 19:16 | |
sorear | std: 1 [+] 2 | ||
p6eval | std 625303c: OUTPUT«ok 00:01 119m» | ||
jnthn | std: 1 [[[+]]] 2 | 19:19 | |
p6eval | std 625303c: OUTPUT«ok 00:01 119m» | ||
jnthn | rakudo: say 1 [[[+]]] 2 | ||
p6eval | rakudo 684fdf: OUTPUT«3» | 19:20 | |
jnthn | :) | ||
19:20
cafesofie left
|
|||
masak | rakudo: say 1 >>[[[[[RRRRR+]]]]]<< 2 | 19:20 | |
p6eval | rakudo 684fdf: OUTPUT«===SORRY!===Could not find sub &infix:<[[[[[RRRRR+]]]]]>» | ||
masak | huh. | ||
moritz_ | rakudo: say 1 [[RR+]] 2 | 19:21 | |
p6eval | rakudo 684fdf: OUTPUT«3» | ||
19:22
dorlamm joined
|
|||
moritz_ | rakudo: say 1 [RR[RR+]] 2 | 19:22 | |
p6eval | rakudo 684fdf: OUTPUT«3» | ||
moritz_ | rakudo: say 1 >>[RR[RR+]]>> 2 | ||
p6eval | rakudo 684fdf: OUTPUT«===SORRY!===Could not find sub &infix:<[RR[RR+]]>» | ||
moritz_ | seems it doesn't like that hyper'ed | ||
jnthn | hmm | 19:24 | |
masak | rakudo: say 1 >>R+<< 2 | 19:26 | |
p6eval | rakudo 684fdf: OUTPUT«3» | ||
masak | rakudo: say 1 >>[+]<< 2 | ||
p6eval | rakudo 684fdf: OUTPUT«===SORRY!===Could not find sub &infix:<[+]>» | ||
masak | seems to be hyper and reduction together. | ||
masak submits rakudobug | |||
jnthn | oh | ||
that's not a reduction | 19:27 | ||
that's a bracketed infix | |||
Or should be.... | |||
benabik | Does >>[+]<< Make sense? Isn't [+] a listop, not a binop? [+] 1, 2 not 1 [+] 2 | ||
colomon | but rakudo screws it up | ||
If you use [+] as an infix, it's just + | |||
benabik | Non-intuitive, but okay. | ||
jnthn | The [+] in >>[+]<< is not related to [+] 1,2,3 style things. It's just the same as >>+<< | ||
Yeah, I was like "wtf" at first :) | 19:28 | ||
colomon | benabik: I'm not sure it isn't non-intuitive and not okay. :) | ||
It seems a very very confusing overload. | |||
jnthn | colomon: Yeah, not sure why it screws it up | ||
masak | jnthn: oh, true. | ||
benabik | colomon: I wouldn't make it work that way, but I'm not the BDFL. I'm willing to accept there may be reasons for it, even if I can't think of any. | 19:29 | |
colomon | and we've already seen a bug where someone accidentally left out an operator and converted a desired [+] reduction into normal infix:<+> with a list on the right-hand side. | ||
jnthn: parser issue? | 19:30 | ||
rakudo: say 5 R[-] 4 | |||
p6eval | rakudo 684fdf: OUTPUT«-1» | ||
jnthn | colomon: I suspect the munging in the actions. | ||
sorear needs to get hypers working in niecza | 19:33 | ||
19:37
stifynsemons joined,
shortcircuit left
|
|||
masak | rakudo: my %info = x => 1, y => 2; my ($x, $y) := %info; say ($x, $y).perl | 19:43 | |
p6eval | rakudo 684fdf: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in 'infix:<:=>' at line 1 in main program body at line 22:/tmp/kudgcUuXVo» | ||
masak | jnthn: should something like that work? | ||
xinming | perl6: Num.new(5).perl.say; | ||
p6eval | niecza v2-15-gf9417bc: OUTPUT«(timeout)» | ||
..pugs: OUTPUT«*** Must only use named arguments to new() constructor Be sure to use bareword keys. at /tmp/KPV3d9A7wS line 1, column 1-20» | |||
..rakudo 684fdf: OUTPUT«0» | |||
jnthn | masak: Can't remember if you need to explicitly capture-ize the RHS | ||
19:43
wiseguyxp joined
|
|||
xinming | rakudo: Num.new(5).perl.say; | 19:44 | |
p6eval | rakudo 684fdf: OUTPUT«0» | ||
xinming | hmm, Why won't this returns the object please? | ||
Just curious. | |||
jnthn | rakudo: my %info = x => 1, y => 2; my ($x, $y) := \%info; say $x, $y; | ||
p6eval | rakudo 684fdf: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in 'infix:<:=>' at line 1 in main program body at line 22:/tmp/LsMKGXbXkQ» | ||
jnthn | er, wtf | ||
I'm sure that _did_ work... | |||
masak | yeah | 19:45 | |
jnthn | oh, wait | ||
rakudo: my %info = x => 1, y => 2; my (($x, $y)) := %info; say $x, $y; | |||
p6eval | rakudo 684fdf: OUTPUT«12» | ||
jnthn | ah. | ||
That's telling. | |||
sorear | xinming: Num doesn't have a user-accessible construcot | ||
19:46
kaydsoft left
|
|||
moritz_ | it should have | 19:46 | |
19:46
rgrau joined
|
|||
masak | jnthn: can I submit as a rakudobug that it doesn't work without the double parens? | 19:46 | |
moritz_ | just for consistency sake | ||
jnthn | masak: Check if the spec says it should first. | ||
masak | oki. | ||
jnthn | masak: I sorta expected it to. | 19:47 | |
19:47
stifynsemons left
|
|||
xinming | sorear: So, Int, Num such kind of types don't have constructor? | 19:47 | |
masak | jnthn: hm. | ||
(:@even, :@odd) := |classify { $_ % 2 ?? 'odd' !! 'even' }, @list; | |||
19:47
cspencer left
|
|||
masak | seems the | is needed, too. | 19:48 | |
rakudo: my %info = x => 1, y => 2; my ($x, $y) := |%info; say ($x, $y).perl | |||
p6eval | rakudo 684fdf: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in 'infix:<:=>' at line 1 in main program body at line 22:/tmp/1QbM2ij3UZ» | ||
masak | but that doesn't work either, so... :) | ||
masak submits rakudobug | |||
jnthn | I'm not sure | knows what to do there | ||
oh, or maybe it does...but does something wrong, hmm | |||
I bet there's some screw-up somehwere in coercion to capture. | |||
colomon | xinming: They don't right now, but that is most likely a bug in Rakudo, not an actual design decision. | 19:49 | |
xinming | Ok, thanks. | ||
jnthn | Note that the way you get from native 2 to an Int object representing 2 isn't a constructor call. But there's no reason not to support a constructor style too. | ||
sorear | If something isn't specced, you can't assume it exists | ||
moritz_ | well, in the long run the correct way to create a Num object is to box a low-level equivalent | 19:50 | |
but what jnthn++ said | |||
jnthn | Right, but Perl 6 does auto-boxing. :) | ||
So you don't have to. :) | |||
sorear | Rakudo and Niecza both recognize Num.new but fail, since it doesn't actually have any useful meaning | ||
19:50
[Coke] left
|
|||
jnthn | sorear: Right. | 19:50 | |
sorear: They just hit the default constructor. | |||
moritz_ | niecza: Num.new(3) | 19:51 | |
p6eval | niecza v2-15-gf9417bc: OUTPUT«Unhandled exception: Excess arguments to SAFE Mu.new, used 1 of 2 positionals at /home/p6eval/niecza/lib/SAFE.setting line 0 (SAFE Mu.new @ 0) at /tmp/DK9rOlq0Aq line 1 (MAIN mainline @ 1) at /home/p6eval/niecza/lib/SAFE.setting line 1044 (SAFE C435_ANON @ 2) | ||
..at /home/p6eva… | |||
sorear | the default constructor builds Num objects with a P6opaque representation, which the rest of the runtime is sadly not very robust about handling | ||
that's part of what I've roadmapped to fix this month | |||
19:52
sji joined
19:53
shi left
|
|||
TimToady | colomon: 1 [+] 2 now warns, but std hasn't updated itself | 19:56 | |
niecza: 1 [+] 2 | |||
p6eval | niecza v2-15-gf9417bc: OUTPUT«Potential difficulties: Useless use of [] around infix op at /tmp/AOZZgjrWwJ line 1:------> 1 ⏏[+] 2» | ||
colomon | TimToady: and no one has fixed Rakudo to have the same warning, so far that I know. :) | 19:57 | |
19:58
risou left
19:59
coldhead joined
20:08
Chillance joined
20:09
[Coke] joined
20:10
stifynsemons joined
20:14
Mowah left
20:16
dukeleto left
20:17
dorlamm left,
dukeleto joined
|
|||
moritz_ | masak: am I to understand that i need at least the first two volumes of "Winning Ways" to get to the interesting games? :-) | 20:20 | |
masak | moritz_: I have the first volume checked out from the library. it wouldn't cross my mind to call it devoid of interesting games. :) | ||
but, by all means, get all four volumes. | 20:21 | ||
the first two are a bit more "theoretical", the latter two a bit more "practical". | |||
20:24
vmspb left
|
|||
moritz_ | well, they aren't cheap :( | 20:24 | |
masak | if only there was some way to win books... | ||
moritz_ | well, I've put it on my wishlist and hope that I didn't mess up p4 too badly :-) | ||
masak | :) | ||
in the interests of suspense, I won't more than smile for now. | 20:25 | ||
arnsholt | moritz_: Well, apparently noone who actually submitted on time did the perfect play variant =) | 20:26 | |
So I'd assume you're still in the running | |||
20:29
solarion left,
solarion joined
|
|||
colomon | I don't know how poor masak is going to decide between different broken implementations. | 20:29 | |
inter-version duel to the death? | |||
masak | I'm thrilled that people did badly on at least one task. | 20:30 | |
otherwise I'd have started to doubt the level of the problems. | |||
colomon | masak: don't know if you saw my comment yesterday. Turns out that if I'd just worked a couple more hours on p4, I'd probably have noticed the 34-repeat pattern. :) | 20:31 | |
masak | colomon: no, I missed that comment. | ||
masak looks | |||
colomon | that was the entire sum of the comment, no point looking for it now. :) | 20:32 | |
masak | found it. | ||
colomon | I actually got far enough to hit the repeat in the code, but not far enough that the repeat was obvious to me. | 20:33 | |
masak | ok. | ||
colomon | just doing it via shear brute force, mind you, no smarts involved. | ||
masak | counterfactuals are always fascinating. :) | ||
colomon | I'm not asking for credit for it, believe me. :) | ||
masak | other contestants might have been close to cracking it and not known it, too :) | ||
colomon | naturally. | ||
what caught my attention is that I worked on the problem for probably something like 40 hours. | 20:34 | ||
masak wonders how long arnsholt spent on the problem | |||
arnsholt | Good question | ||
colomon | I thought I was chasing down completely the wrong path, but I was actually really close to having it worked out. But close doesn't count. | 20:35 | |
arnsholt | I spent quite a bit of time on the research, and just figuring out how this octal game business worked | ||
colomon | arnsholt++ | 20:36 | |
arnsholt | Once I managed to wrap my head around it, it turned out that the user-facing code took more time than the AI part proper | ||
masak | :) | ||
...which shows that the problem was in the same class as the others: "easy if you know how" | 20:37 | ||
arnsholt | Which, TBH, I think is in part because the AI code is very abstract | ||
My gut feeling is that with a differently designed AI code the UI part could probably be simplified | |||
moritz_ actually did two DP attempts, but each time failed to properly combine the sub-solutions | 20:40 | ||
masak | the combination operations are quite non-obvious and specific to this type of games, I would say. | 20:41 | |
arnsholt | Definitely. I don't think I'd gotten it without Wikipedia | ||
There's a part of me that wants to know how that stuff falls out of the theory | 20:42 | ||
masak | it's the "unknown unknowns" that prevented most people from reaching for Wikipedia. | ||
arnsholt: how do you mean? | |||
arnsholt | The other part of me suspects that it's really, really hairy =) | ||
masak | (maybe I can help) :) | 20:43 | |
arnsholt | Actually, your posts were quite helpful =) | ||
masak | the only thing I don't understand is where 34 comes from :P | 20:44 | |
arnsholt | Good question. I guess it's either completely arbitrary, or hsa to be like that because of deep and inscrutable number theory =) | 20:45 | |
masak | I don't feel comfortable with either answer... | ||
arnsholt | A true mathematician's answer | 20:46 | |
20:48
ofir joined
|
|||
masak | arnsholt: I'm looking at lib/Kayles.pm for the first time. nice code. | 20:48 | |
20:49
shortcircuit joined
20:50
kjeldahl joined
20:53
wooden left
|
|||
arnsholt | Thanks! I'm quite happy with that part of the code, actually | 20:53 | |
20:53
wooden joined
|
|||
arnsholt | The theory turned out to be pretty straightforward to put into code | 20:53 | |
You don't have to look too much at the UI bits ;) | 20:54 | ||
masak | :) | ||
moritz_ | masak: maybe you can review arnsholt's code for p4 too (and just mention it's post deadline) | 20:57 | |
20:57
mikehh left
|
|||
masak | moritz_: yes, I'll end up doing something like that. | 20:58 | |
note that even if arnsholt had made the deadline, which he deplorably didn't, he'd still have sent in only four solutions. | |||
huh, someone on parrot-dev just released something called xE2x84xA6xCExB7;)XD | |||
plobsing++ | 20:59 | ||
moritz_ nods | |||
21:00
Axius joined
21:04
Chillance left
21:15
kaydsoft joined
21:16
kaare_ left
21:17
jasonmay is now known as JasonMay
21:18
kaare_ joined
21:21
kaydsoft left
21:24
Axius left
21:31
JasonMay is now known as jasonmay
21:32
kaydsoft joined
|
|||
ofir | is perl5 expected to be totally deprecated after perl6 is officialy released ? | 21:35 | |
tadzik | no | ||
jnthn | No | ||
masak | ofir: Perl 6 has been officially released. | ||
ofir | oh nice to know | ||
masak | and Perl 5 hasn't been totally deprecated. | 21:36 | |
ofir | so those are 2 different dev branches ? | ||
masak | exactly. | ||
you got it in two guesses :) | |||
ofir | heh | ||
masak | nicely done. | ||
mathw | perl 6 isn't backwards compatible with perl 5, so we can't declare that perl 5 is gone | ||
the perl 5 community would hate that anyway :) | |||
masak | yeah, they'd be pretty pissed off, I think. | ||
heck, I'd be a little angry. | 21:37 | ||
jnthn | :) | ||
jdhore | Perl 6 seems VERY nearly 100% backward-compatible to Perl 5 to me, but what do i know. | ||
21:37
pmurias joined
|
|||
masak | jdhore: well, they're not totally dissimilar. but saying that they're close isn't exactly it either. | 21:37 | |
ofir | like anything in life, it is a matter of time until Perl 5 will no longer be maintained | ||
masak | jdhore: it was more true around 2002-2003. | 21:38 | |
diakopter | ofir: most would disagree with that | ||
ofir | diakopter, why, what's the point in the duplicites of two different languages in one langauge ? | ||
sorear | perl 5 will die | ||
very slowly | |||
mathw | jdhore: there's really not much perl 5 you can feed to a perl 6 compiler and have it work | 21:39 | |
sorear | it will probably still be in use 40 years from now | ||
ofir | diakopter, it's as if I'll tell you that you can still burn CD's, and floppy disks, but you wouldn't | ||
diakopter | it's installed just too many places, and too many places rely on it for building/bootstrapping other software that must live on forever | ||
benabik | Perl 6 will replace Perl 5 the same way C++ replaced C. | ||
sorear | I assign 80% odds that perl 5 will reach "dead language" status before Perl 6 | ||
masak | benabik: that is to say, "not really"? :) | ||
diakopter | ofir: not even close. | ||
masak | ofir: what diakopter said. | ||
ofir: I'm an ardent Perl 6 user, and I use Perl 5 quite a bit. | 21:40 | ||
diakopter | there are tens or hundreds of perl5 installations, and I fully agree with sorear that it'll still be in use 40 years from now. | ||
masak | ofir: some of the reasons is of the "at this point in time" kind, but not all of it. | ||
ofir | masak, until one day it'll give you the creeps and you're mind will be split to 5 & 6 chunks, and you'll decide that there's a room for one perl only | ||
masak | diakopter: s/hundreds/hundreds of thousands/? | 21:41 | |
diakopter | in an individual's mind, maybe, but that has nothing to do with the market as a whole | ||
mathw | hundreds of thousands, more like | ||
jdhore | Also, it'll prolly take a very long time till most of the CPAN is P6 | ||
diakopter | masak: bwahaha; I meant to say tens or hundreds of millions :D thanks | ||
masak | diakopter: :) | ||
mathw | and many, many of those aren't even a very recent Perl 5 | ||
masak | ofir: actually, I feel I'm moving in the other direction. | ||
21:41
wallberg joined
|
|||
mathw | (which is a big shame) | 21:41 | |
masak | ofir: I'm learning more and more programming languages, and Perl 5 and Perl 6 keep coming out as my favorite two. | 21:42 | |
Su-Shee | ah well that old perl 5 feeds 55 people here for example. ;) | ||
21:42
wallberg left
|
|||
jdhore | ascent_, for me, that's Perl 5, Perl 6 and C 9in no particular order) | 21:42 | |
*( | |||
21:43
wallberg joined
|
|||
diakopter | .( | 21:43 | |
mathw | Perl 5 skills pay part of my salary... | ||
a very small part, but part :) | |||
jdhore | er, i highlighted the wrong person, i suck. | ||
masak, ^^ | |||
mathw | mostly, I get paid for being very patient | ||
:P | |||
Su-Shee | well it boils down to environment.. every time I try something else but perl I'd either have to use java or python to get something even resembling CPAN's power. | 21:44 | |
mathw | Mmm I recently got the freedom to do a script with as many CPAN modules as I wanted/needed | ||
found some very helpful ones indeed | 21:45 | ||
Su-Shee | last weekend I got stuck with something as stupid as javascript's \w not working properly with umlauts. | ||
mathw | although there wasn't one which did precisely what I wanted, which was disappointing because I thought there might be (or at least, I couldn't find one) | ||
Su-Shee: eeww | |||
Su-Shee | yeah that's what I said but with more words ;) | ||
pmurias | mathw: what did you intend to do? | ||
21:47
pmurias left
|
|||
diakopter | ofir: last I looked, even git depends on perl... (someone correct me where I'm wrong) | 21:49 | |
ofir | diakopter, correct | 21:52 | |
diakopter | (my point is that all the (tens/hundreds? of) thousands of free/open-source software packages/projects that depends on Perl 5 (NOT TO MENTION the 100x that amount (probably, by lines of code) of unseen/corporate/private Perl 5 code) would all need to recursively remove/port all those Perl 5 dependencies, or go dormant/obsolete themselves, in order to satisfy your claim) | ||
Su-Shee | yeah. if it's out there, it's out there. ;) | 21:53 | |
diakopter | (by a wide definition of "maintained") | 21:54 | |
for example. | |||
Su-Shee | I don't want to know how many perl scripts are silently running for a decade noone ever touching them until they get forgotten.. | ||
ofir | diakopter, well I guess you are right, it doesn't count by number of weeks nor months, but It must happen sometime | ||
diakopter | lifetimes | 21:55 | |
Su-Shee | ofir: there is no "must happen" - a perl renaissance could happen as well. | ||
diakopter | (the other half of my point is that if there are so many softwares dependent on it, it will be "maintained" *enough* for them, b/c they need it) | 21:56 | |
dalek | p-rx/nom: ad21c53 | jonathan++ | / (5 files): Role composition for when a class just does a single role (we don't do the role summation case just yet). Seems method and attribute composition works, methods in the class beat ones from the role and mentions of $?CLASS are correctly generic. |
||
ofir | diakopter, and who guarantees that support & maintenance ? | ||
masak liked the phrase "recursively remove/port all those Perl 5 dependencies" | 21:57 | ||
that's not really true, though. Perl 5 could stop being maintained, and all that code could still exist out there. | 21:58 | ||
just as some people still run Perl 4 code, even though Perl 4 isn't being maintained. | |||
diakopter | eh, I was using a wide definition of maintained | ||
masak | does it matter? unmaintained Perl versions don't just disappear... | 21:59 | |
BinGOs | Perl5::ButMaintained | ||
diakopter | like, "still available to download", and "folks available/willing to be paid to consult on it privately to maintain/install/support it if it's not publicly maintained" | ||
masak | oh, ok. | 22:00 | |
22:00
wallberg left
|
|||
diakopter | i guess another portion of my argument would need to be that those private supporters would help keep it public too. | 22:00 | |
(seems reasonable to me) | 22:01 | ||
22:03
dakkar left
22:06
icwiener left
22:10
kjeldahl left
|
|||
dalek | rixel: 86dcfe6 | diakopter++ | / (9 files): [perlesque] (compiler) yet another iteration of improvements to generics on mono |
22:12 | |
diakopter | sorear: re "80% odds"... that's interesting | 22:13 | |
22:19
cosimo joined
|
|||
sorear | jnthn: Any progress on subset/native types in 6model? | 22:19 | |
22:19
cafesofie joined
|
|||
jnthn | sorear: 'fraid not. I had a lack of tuits last week to do much Perl 6 stuff at all. Much of the thinking time I have had has gone into how to factor roles and trying to work out a roadmap for the rakudo/nom branch. | 22:21 | |
sorear: Though I think roles may soon make me hit the same issue that subset types bring up in terms of the type cache. | |||
sorear | jnthn: any type 'does' a finite number of roles | ||
but an infinity of subset types | 22:22 | ||
jnthn | sorear: That's not exactly true. | ||
sorear | ? | ||
jnthn | In the non-parametric case you're right. | ||
but PR[S] ~~ PR[T] is true where S ~~ T | |||
It's still finite in a sense | 22:23 | ||
But not automatically in a useful way. | |||
Well, the totally non-parametric case of roles doesn't actully exist. | 22:24 | ||
Since any mention of $?CLASS is generic. | |||
But you get a certain amount of simplification if you only handle that case. | |||
xinming | What is twigil mean please? | 22:30 | |
jnthn | $!foo $*bar $.baz # in these, the twigils are !, * and . | ||
xinming | jnthn: thanks | ||
jnthn | It's a "secondary sigil" essentialy | ||
benabik | Name is derived from sigil number two, or something similar. | 22:31 | |
xinming | Ok, got it. thanks | ||
masak | 第二个sigil :) | 22:33 | |
diakopter | chimchimney | 22:35 | |
masak | I don't even see the characters anymore. to me, they're just blonde, brunette... | 22:36 | |
jnthn | That's kinda shallow. They all have personalities and stuff. | 22:37 | |
masak | jnthn: www.imdb.com/title/tt0133093/quotes?qt0324317 | 22:41 | |
jnthn | Oh! | ||
masak | you might have seen it... :) | 22:42 | |
jnthn missed that reference completely, and was trying to work out why masak had randomly context-switched... :) | |||
masak | (too bad they never made any sequels) | ||
diakopter | or prequels | 22:44 | |
22:44
garo joined
|
|||
tadzik | yeah | 22:44 | |
sorear | I'm thinking parametrized roles need to have a little bit of the subset-nature | 22:47 | |
jnthn | sorear: In so far as "a simple type cache won't get us all the way", certainly. | 22:48 | |
sorear: The main issue at the moment is that the type cache is "all or nothing". | 22:49 | ||
Which isn't really ideal. | |||
I just didn't settle on exactly how to change it yet. | |||
22:49
garo left
22:50
am0c joined,
kaare_ left
|
|||
jnthn | We'd really like "is this some kind of Positional/Callabe/Associative" to be fast. | 22:50 | |
At the moment it's painfully not. | |||
jnthn wonders if NQP roles should supporting punning or just demand they be composed into something | 22:52 | ||
23:05
drbean joined
23:06
leprevost joined
23:07
leprevost left
23:08
leprevost joined
23:11
leprevost left,
jql joined
23:12
benabik is now known as benabik_away
|
|||
masak | '♞, #perl6. | 23:16 | |
23:16
masak left
23:17
jaffa4 left
23:18
guidj0s joined
|
|||
colomon | "black knight, #perl6"?? ;) | 23:19 | |
arnsholt | White knight on my end =p | 23:21 | |
23:22
guidj0s left
|
|||
jnthn | sleep & | 23:22 | |
23:27
orafu joined
23:29
am0c left
|
|||
diakopter | TimToady: knap01 works now on mono :) | 23:32 | |
3 seconds on the p6eval machine from the shell, but oddly 30 seconds from p6eval | |||
I'm trying to diagnose why | |||
hm, maybe p6eval needs another execution mode ;) | 23:33 | ||
...at least for perlesque | |||
23:36
MayDaniel left
23:39
jasonmay left
23:49
rgrau left,
hudnix joined
|