»ö« 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 moritz_ on 1 September 2010. |
|||
echosystm | ...and yet an object model requires class members (eg. constructors) just to work at all | 00:00 | |
chromatic | There's a difference between class *data* and static methods. | ||
echosystm | i | ||
diakopter | that idea isn't unique to (or concentrated in) the perl community, at all... :) | ||
echosystm | i'll agree class data is often mis-used and should be placed elsewhere | 00:01 | |
but, i see no problem in class variables that serve to identify the classes | |||
florz | echosystm: constructors in the sense of "initializers" can be object methods just as well, in general | ||
echosystm | of course, like __init__ in python | ||
but the point is, there is always a class method somewhere (__new__) | 00:02 | ||
chromatic | Doesn't have to be a class method, but I'm not sure why it's a distinction. | ||
diakopter | it's only incidentally a class method | ||
florz | and if you consider prototype-based stuff as "object systems", it really becomes somewhat difficult to argue that you need class methods ;-) | ||
diakopter | __new__ is only a "method" just cuz there's nowhere else to stuff it. it's really just a global (or whatever scope the class has) routine... | 00:03 | |
chromatic | Unless you take the Perl 6 view of typed Undef prototype objects. | 00:04 | |
echosystm | i had better get back to work - but a long story short is that nothing will change in regards to class members? | 00:05 | |
00:05
azert0x left
|
|||
chromatic | Seems like a design smell to me, but I'm sure you can violate class encapsulation if you work at it. | 00:05 | |
echosystm | well, a common use for us is persistence | 00:06 | |
chromatic | I'd use a role for that. | ||
echosystm | in other languages, we simply add 4 methods to any object we want to persist - update and delete (instance), load and create (class) | 00:07 | |
diakopter | is it unfortunately the case that sometimes shortterm design smelliness must be tolerated to achieve whipitupitude, when *using* a language (which i think is to what chromatic was referring).. (as opposed to designing, say, Perl 6) | ||
echosystm | in perl, if we want to keep things "the perl way", we have to separate our logic into a "loader" class and a "result" class | ||
chromatic | Or use a Persists role. | ||
echosystm | well, what we usually do in php is define for example a "TableModel" class, which has a class variable to identify the table | 00:08 | |
the update, create, read and delete methods are then just queries to run agains tthat table | 00:09 | ||
thus, we just subclass our TableModel class and change the table name | |||
chromatic | My preference is to use a parametric role. | ||
Though that's only if you need a table name without a well-defined mapping from the class name. | |||
florz | echosystm: and that somehow doesn't work with perl(5)? | 00:10 | |
echosystm | nope, because theres no way for a superclass method to reference subclass package variables | 00:11 | |
chromatic | Doesn't have to be a variable though. | ||
You get better polymorphism if it isn't. | |||
diakopter | use an accessor.. | ||
echosystm | hmm | ||
interesting | |||
that is a good point | 00:12 | ||
florz | echosystm: Well, as the other say: an accessor is probably the way to go. But sure you can access package variables of the package that your object is blessed as. | ||
chromatic | That's the "design smell" point to which we alluded earlier. | ||
echosystm | how do you do that florz ? | ||
chromatic | If this behavior is a necessary part of your interface, make it a standard part of your interface (without forcing subclasses or delegates or reimplementations to adhere to a specific implementation). | 00:13 | |
echosystm | sub classMethod { $class = shift; print $class::variable; } something like this obviously doesnt work | ||
diakopter | no, but using an accessor that gets/sets a var created in a closure during class declaration ... | 00:15 | |
chromatic | Something more like sub class_method { my $obj = shift; my $class = Scalar::Util::blessed( $class ) ? ref( $self ) : $self; no strict 'refs'; return ${ $class . '::variable_name' } } | ||
... but the ugliness of that approach argues (to me) against it. | |||
diakopter | to steal from modern_perl/chapter_07: { package Cat; use Moose; my $classvar1_; sub classvar1 { return defined $_[0] ? ($classvar1_ = $_[0]) : $classvar1_ } } | 00:19 | |
well, stealing "package Cat" :) | 00:20 | ||
or just hardcode the table names, which it sounds like you'd do. so the method is just overridden. | 00:21 | ||
urp, those should be $_[1] | |||
00:21
aloha left
00:23
bacek left
|
|||
echosystm | i see | 00:23 | |
florz | chromatic: s/\$class/\$obj/ for the latter occurence, I suppose ;-) | ||
or rather the one in the middle ;-) | 00:24 | ||
echosystm: essentially, you cann find out the package from ref($self), then construct the qualified variable name from that as a string, and use it as a symbolic reference | 00:25 | ||
echosystm | is this how MooseX::ClassAttribute and ClassMethod work? | ||
diakopter gets curious as to which is faster, the symbolic reference construction or the closure access | |||
diakopter has no freaking clue | 00:26 | ||
echosystm: I dunno, but now you've got me curious about that too... | |||
chromatic | The closure should be a lot faster. | 00:32 | |
It has the disadvantage that you have to repeat it in every subclass. | |||
diakopter | not necessarily, but I see your point; you'd have to repeat it in every subclass if you wanted to make the var "class private" or whatever. | 00:35 | |
00:36
skangas joined
|
|||
chromatic | If you want one table per class, you need to make it per-class. | 00:36 | |
It's the same as the singleton problem. | |||
diakopter | otherwise it's "class protected", to use C# parlance | ||
chromatic | That's the worst part of class data: the lack of encapsulation means you're finalizing part of your hierarchy. | 00:37 | |
00:37
skangas left
|
|||
diakopter | yeah; to echosystm's application. these are good points ... is it too late to add discussions of these things to that ch07? | 00:38 | |
(if it's not already there; I haven't read the whole ch) | |||
chromatic | There's still time, but it's a balance between "Here's how modern Perl OO works" and "Here's how to design programs well.: | 00:39 | |
00:40
alksentrs joined
|
|||
lichtkind | where can i look for learning writing binary binding for parrot? | 00:41 | |
plobsing | lichtkind: that question is probably better asked on #parrot | 00:42 | |
lichtkind | plobsing: yes | 00:44 | |
00:44
whiteknight joined
00:47
gfx joined
00:54
Psyche^ joined
00:58
Patterner left,
Psyche^ is now known as Patterner
|
|||
diakopter | mruhaha; /me figured out tortoisegit | 01:06 | |
github.com/perl6/std/commit/754f724...b72231a769 | 01:07 | ||
moritz_: yeah someone should add these repos to dalek :) | |||
for teh karma | |||
01:11
kst left
01:12
sjohnson left,
justatheory left,
sjohnson joined
|
|||
diakopter | sjohnson: IE9 now enumerates any property on a DOM object that has its “enumerable” property descriptor value set to ‘true’. (In other words, enumeration can be programmatically altered.) | 01:14 | |
01:18
kst joined
01:20
jhuni left
01:21
alksentrs left
01:22
tylercurtis joined
01:25
whiteknight left,
sahadev joined
01:29
f00li5h left,
sahadev left,
f00li5h joined
|
|||
dalek | ecza: 5ceab02 | sorear++ | / (2 files): [nrx] Reimplement grammars |
01:36 | |
ecza: b199a36 | sorear++ | / (6 files): [nrx] Reimplement simple cuts |
|||
01:41
meppl left
01:45
f00li5h left,
f00li5h joined
01:49
Buttom_Left joined
|
|||
Buttom_Left | hello | 01:50 | |
01:50
mfollett joined
|
|||
sorear | Hellow | 01:51 | |
Buttom_Left | perl a good manual in Spanish that I can recommend, that alone with basic manual, but that I have it clear. | 01:52 | |
sorear | seen araujo | ||
Is that a question? | 01:53 | ||
01:54
redicaps joined
|
|||
Buttom_Left | one is for those who can respond | 01:54 | |
01:56
hercynium joined
02:05
rare left
|
|||
colomon | [Coke]: ping? | 02:16 | |
02:18
Buttom_Left left
|
|||
lichtkind | good night | 02:22 | |
02:22
lichtkind left
02:29
drbean left
02:30
DiegoGrez joined
02:31
DiegoGrez left
02:35
DiegoGrez joined,
pythonian4000 joined
02:36
agentzh joined
|
|||
pythonian4000 | Can anyone here help me troubleshoot ilbot2? | 02:37 | |
sorear | moritz_ could | ||
02:39
jferrero left
|
|||
DiegoGrez was looking for the same thing for Wikinews | 02:40 | ||
sorear | perl 6? wikinews? is something important going on? | ||
02:41
sftp left
|
|||
sorear is out of the loop... | 02:41 | ||
DiegoGrez | ilbot :) | ||
sorear | rakudo: "abc" ~~ / $<bob> = [ (.) (.) (.) ] /; say $/.perl | 02:45 | |
p6eval | rakudo 77a72a: OUTPUT«Match.new( from => 0, orig => "abc", to => 3, positional => [ Match.new( from => 0, orig => "abc", to => 1, ), Match.new( from => 1, orig => "abc", to => 2, ), Match.new( from => 2, orig => "abc", to => 3, ), | ||
..], n… | |||
sorear | rakudo: "abc" ~~ / $<bob> = [ (.) (.) (.) ] /; say $<bob>.perl | 02:46 | |
p6eval | rakudo 77a72a: OUTPUT«Match.new( from => 0, orig => "abc", to => 3,)» | ||
pythonian4000 | I have solved most of the issues with missing Perl modules, but the one missing file left is IrcLog.pm. I thought it might be part of Parse::IRCLog, but seems not. | 02:51 | |
(Well, it's the only one that Perl cant find at the moment.) | 02:52 | ||
02:54
drbean joined
02:56
justatheory joined
03:06
masak joined
|
|||
masak | oh hai, #perl6! | 03:06 | |
wow, there's something almost magical about the pre-dawn hours. | |||
pythonian4000 | moritz_: I am trying to get an instance of ilbot set up. I have solved most of the issues with missing Perl modules, but the next file that Perl can't find is IrcLog.pm. I thought it might be part of Parse::IRCLog, but seems not. | 03:07 | |
03:09
redicaps left
|
|||
sorear | Hello Masak! | 03:10 | |
masak | pythonian4000: you may of may not be aware that moritz_ is not woken up yet. also, the topic you're addressing prolly belongs in /msg rather in #perl6. | 03:11 | |
s/of/or/ | |||
pythonian4000 | Ah, sorry. Different timezone. Thanks. | 03:12 | |
03:19
justatheory left
03:20
Italian_Plumber left
03:22
au|irc joined
03:37
Axius joined
|
|||
masak | my @directions = (1, -1 X 2, -2), (2, -2 X 1, -1); # that's very cute. from github.com/perl6/perl6-examples/blo...pratomo.pl | 03:41 | |
03:45
mfollett left
|
|||
sorear | o/ au|irc | 03:45 | |
masak | o/ au|irc | 03:46 | |
I don't know why, but I'm still not really sure I like 'next' inside 'map' blocks binding to the map block. in my view, 'map' isn't a control structure like 'for' is. | 03:47 | ||
lue | ohai o/ | ||
masak | and should be treated according to different rules. | ||
hi, lue. | |||
pmichaud | masak: I've heard "for is isomorphic with map" so many times I've stopped arguing against it :) | ||
masak | I've heard it numerous times as well. | 03:48 | |
sorear | I don't buy it. | ||
masak | I just question the wisdom of it in cases like 'next'. | ||
it doesn't least-surprise for me. | |||
I'd expect 'next' to bind up to the innermost loop, not the map. | |||
sorear | masak: 'next' is specced to search the dynamic call stack if there is no innermost lexical loop | 03:49 | |
masak | and I don't see that as having very much to do with the isomorphism, actually. it's more a question of 'map' not having the execption handlers 'for' has, since only the latter is a control structure. | ||
sorear | so if there's a loop in &map, next will be able to bind to it | 03:50 | |
(Rakudo doesn't implement the lexical search and always goes directly to the innermost dynamic loop ATM) | |||
masak | sorear: 'is there is no innermost lexical loop'. but as soon as there is...? | ||
sorear | masak: if there is an innermost lexical loop, next will not bind to for. | ||
masak | I think that behaviour sounds flaky to the point of being dangerous. | ||
imagine the bugs we'll be able to produce! :( | 03:51 | ||
"hm, I move this 'map' out of the loop, and now my program does Very Strange Things..." | |||
sorear | S04:71 | ||
masak | I know what it says. | ||
I'm just ranting about it. | |||
03:51
dalek left
|
|||
sorear | ok | 03:51 | |
03:51
dalek joined,
ChanServ sets mode: +v dalek
|
|||
diakopter | well, I tried to add all those repos to dalek | 03:53 | |
we'll see if they took | |||
masak | some big blogger once ranted about exceptions being Evil because they are essentially Action-at-a-Distance. I thought it was a bit extreme. but in this case, I'm prepared to agree. I'm willing to be convinced otherwise by being shown a use case where "lexical lookup, then dynamic lookup" is a sane idea. | ||
diakopter++ | |||
also, "hm, I put a loop around this map statement, and now 'next' doesn't work anymore". | 03:54 | ||
clearly no-one has actually tried to use this "feature". | |||
hugme: hug masak | |||
hugme hugs masak | |||
pmichaud | "...it's more a question of 'map' not having the exception handlers 'for' has..." | 03:56 | |
I'm not sure I understand. | |||
masak | pmichaud: from Perl 5, I'm conditionad when I look at code to associate 'next'/'last'/'redo' with the surrounding loop. | 03:57 | |
03:57
Axius_ joined
|
|||
masak | pmichaud: lexically or dynamically surrounding. | 03:57 | |
to me, &map and &grep aren't such loops. | |||
they're functions. | |||
03:58
Axius_ left
|
|||
pmichaud | ah | 03:58 | |
masak | and as a programmer, I don't care how they're implemented inside. | ||
neither should I need to. | |||
pmichaud | because right now, &map has those exception handlers | ||
masak | right. | ||
as a first approximation, I think control exceptions are the domain of control structures. | |||
pmichaud | and you're correct, I haven't quite figured out how to make FIRST, NEXT, LAST, etc. work within map. | 03:59 | |
03:59
dalek left
04:00
BillN1VUX left,
Axius left
|
|||
pmichaud | (I'm sure it can be done; just haven't figured out how to do it in our current framework) | 04:00 | |
04:00
dalek joined,
ChanServ sets mode: +v dalek
|
|||
sorear hasn't figured out how to make FIRST, LAST, NEXT work within -p/-n | 04:00 | ||
diakopter | sigh (at dalek) | 04:01 | |
04:03
dalek left
|
|||
pmichaud | masak: anyway, I'll support the notion that for and map are different. I've argued it before w/little success, though. | 04:03 | |
04:03
dalek joined,
ChanServ sets mode: +v dalek
|
|||
diakopter | ugh. now none of them works | 04:04 | |
masak | I think the war cry of this political program should be "isomorphism, sure -- but 'map' ain't a control structure, dammit!" | ||
diakopter | even with the new one I added, commented out in botnix.conf | ||
how 'bout a specially named map, like mape | 04:05 | ||
for the one that handles control exceptions | |||
masak | also, when is Perl 6 gonna be released, dammit | ||
:) | |||
diakopter: sounds like an interesting thing for a dedicated module to do. | 04:06 | ||
diakopter | ouch. | 04:07 | |
masak | no offense intended. | ||
I just don't think most people want 'mape'. | |||
diakopter | of course. but if only I could count the number of times I've been told that. | ||
masak | it's a useful reminder that not everything needs to be core. | 04:08 | |
TimToady | map is a control structure | ||
and "for" is just a funny looking function | 04:09 | ||
04:09
hercynium left
|
|||
masak | :( | 04:09 | |
TimToady: 'map' is mentioned *once* in S04! and clearly not as a control structure. | 04:10 | ||
TimToady | I'm not interested in building in magical special cases like Perl 5 was full of. I would like users to be able to write their own control structures by dealing with closures as arguments | 04:11 | |
04:11
BillN1VUX joined
|
|||
TimToady | this is about extensibility and the future, not about what you're used to | 04:11 | |
in this case, I think orthogonality should win | 04:12 | ||
BillN1VUX | TimToady: aha thank you. even better on primality. | ||
TimToady | wish we could make the series behave a bit better and read my mind... | ||
probably need to factor that into the refactor of ... | 04:13 | ||
for instance, the fact that | 04:15 | ||
rakudo: say 2,3,4 ... sqrt(2) | |||
p6eval | rakudo 77a72a: OUTPUT«» | ||
TimToady | does the right thing, but | ||
rakudo: say 2,3,*+1...sqrt(2) | |||
doesn't | 04:16 | ||
p6eval | rakudo 77a72a: | ||
..OUTPUT«(timeout)011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301… | |||
BillN1VUX | indeed. | ||
TimToady | the primes example really wants the first behavior | ||
BillN1VUX | yes | ||
TimToady | hmm | ||
pmichaud | TimToady: (map/for) -- okay, I get it now. And I agree. | 04:17 | |
TimToady | rakudo: say 2,3,5,7 ... sqrt(2) | ||
p6eval | rakudo 77a72a: OUTPUT«» | ||
TimToady | maybe that's the right way | ||
say 2 %% none 2,3,5,7 ... sqrt(2) | |||
or not | |||
rakudo: say 2 %% none 2,3,5,7 ... sqrt(2) | 04:18 | ||
p6eval | rakudo 77a72a: OUTPUT«none()» | ||
TimToady | rakudo: say so 2 %% none 2,3,5,7 ... sqrt(2) | ||
p6eval | rakudo 77a72a: OUTPUT«1» | ||
BillN1VUX | although as an old APL hack I await ability to iterate into shaped arrays so I can recreate the classic APL parallel computation by column reduction | ||
nice | 04:19 | ||
TimToady | you mean treat the array as flat? | ||
sorear | TimToady: in while ... map ( { ... next ... } ), can I do something to make next target the map instead of the while? | 04:20 | |
BillN1VUX | i mean I want 1..$n X%% 1..$n in a shape:($n;$n) square matrix | ||
pmichaud | sorear: ...use a label? | 04:21 | |
TimToady | sure, if we had loop lablels | ||
sorear | pmichaud: How can I label a map call? | ||
TimToady | s/lel/el/ | 04:22 | |
tylercurtis | Whether or not map should handle next is a different issue from whether functions in general can handle control exceptions, isn't it? | ||
diakopter | sorear: I agree that question gets at the matter better | ||
pmichaud | sorear: I suspect the same way we end up labeling a for call. | ||
04:22
Guest62968 left
|
|||
masak | tylercurtis: that's a good point. | 04:22 | |
tylercurtis: but for and map are isomorphic. | |||
pmichaud | (no, I don't know what that is yet.... and thus Rakudo doesn't have labels :0) | ||
TimToady | next can be a method on any dynamically locatable loop | ||
pmichaud | correct. | ||
BillN1VUX | looks like when all of S09 is in, APL rho operator will be creatable, and I can recreate that sieve | 04:23 | |
TimToady | we usually call that reshaping | ||
BillN1VUX | that's what APL called it too | ||
TimToady | maybe we should call it rhoshaping :) | ||
BillN1VUX | rho was mnemonic for reshaping iirc | ||
TimToady | I think something like that is better spelled out with a word, huffmanly speaking | ||
BillN1VUX | not gonna argue | 04:24 | |
TimToady | that's the problem with APL, everything is huffmanized to one char (to the first approximation) | ||
BillN1VUX | the curse and the joy both | ||
TimToady | for some pretty fancy definition of "char" | ||
BillN1VUX | heh | ||
golf is easy when every | 04:25 | ||
TimToady | the none 2,3,5,7 ... sqrt $n still bogs down somewhere in test, dunno why | ||
BillN1VUX | thing is on UNICODE point | ||
TimToady | and if we all want to get the most out of 140-char tweets, we'd all better learn Chinese or some such | 04:26 | |
masak | TimToady: and combine graphemes. | ||
TimToady | maybe we can teach phones about NFG :) | 04:27 | |
sorear | lz77 >> chinese | ||
TimToady | tempting | ||
pmichaud | TimToady: I'm not following the none 2,3,5,7 ... sqrt $n fully -- what are you trying to do? | ||
(I'm a little distracted atm, I admint) | 04:28 | ||
*admit | |||
TimToady | 2,3,5,7 ... is supposed to only pay attention to the 3,5,7, and intuit the *+2. | ||
sorear | TimToady: I can't seem to find the part of S04 dealing with bare "next;". Does it go for the innermost lexical loop, as I first thought, or is it automatically dynamic? | ||
BillN1VUX | It's at ? so 5 %% none 2,3,5,7 ... sqrt(5) that it hangs | ||
TimToady | floor helps there but then it hangs after 15 for some reason | 04:29 | |
pmichaud | rakudo: say ~(2,3,5,7 ... 14) # checking | 04:30 | |
p6eval | rakudo 77a72a: OUTPUT«2 3 5 7 9 11 13» | ||
TimToady | rakudo: say ~(2,3,5,7 ... 16) | ||
p6eval | rakudo 77a72a: OUTPUT«2 3 5 7 9 11 13 15» | ||
pmichaud | I'm wondering if none needs parens | ||
TimToady | shouldn't | ||
it's a listop | |||
pmichaud | so is ..., iirc | 04:31 | |
TimToady | should be looser than ... | ||
pmichaud | okay | ||
I'm not sure we have that in rakudo atm | |||
looking | |||
BillN1VUX | It's not none's fault. say $_ for 2,3,5,7 ... sqrt(7) # infinite series | 04:32 | |
TimToady | parens don't help | ||
pmichaud | oh, the series never crosses the endpoint | ||
rakudo: say $_ for 2,3,5,7 ... sqrt(100); | 04:33 | ||
p6eval | rakudo 77a72a: OUTPUT«23579» | ||
pmichaud | rakudo: say $_ for 2,3,5,7 ... sqrt(50); | ||
p6eval | rakudo 77a72a: OUTPUT«2357» | ||
pmichaud | rakudo: say $_ for 2,3,5,7 ... sqrt(10); | ||
p6eval | rakudo 77a72a: | ||
..OUTPUT«(timeout)1113151719212325272931333537394143454749515355575961636567697173757779818385878991939597991011031051071091111131151171191211231251271291311331351371391411431451471491511531551571591 | |||
pmichaud | rakudo: say $_ for 2,3,5,7 ... sqrt(16); | ||
TimToady | O_o | ||
p6eval | rakudo 77a72a: | ||
..OUTPUT«(timeout)1113151719212325272931333537394143454749515355575961636567697173757779818385878991939597991011031051071091111131151171191211231251271291311331351371391411431451471491511531551571591 | |||
TimToady | sure looks like a bug to me | 04:34 | |
pmichaud | what should happen there? | ||
BillN1VUX | that will suppress whole series, but won't emit one and stop. | ||
TimToady | rakudo: .say for 2,(3,5,7 ... sqrt 16) | ||
pmichaud | (I agree it's a bug. I don't see what part of the spec applies.) | ||
p6eval | rakudo 77a72a: | 04:35 | |
..OUTPUT«(timeout)1113151719212325272931333537394143454749515355575961636567697173757779818385878991939597991011031051071091111131151171191211231251271291311331351371391411431451471491511531551571591 | |||
04:35
Axius joined
|
|||
TimToady | I need to stop putting off the rewrite of the ... spec, I guess | 04:36 | |
diakopter | rakudo: .say for 2,3,(5,7,9 ... sqrt(10)); | ||
p6eval | rakudo 77a72a: OUTPUT«23» | ||
BillN1VUX | hard for a generator ... limit to inspect to the left of the generator isn't it ? | 04:37 | |
rakudo: .say for 2,3,(5,7,9 ... sqrt(2)); | |||
p6eval | rakudo 77a72a: OUTPUT«23» | ||
pmichaud | actually, the ... generator has access to the entire lhs (unless parenthesized) | ||
BillN1VUX | of course what we need is () | ||
TimToady | yes, or 2 comes out not prime | 04:38 | |
BillN1VUX | so it could, if the spec said to | ||
? | |||
diakopter | :) | ||
04:38
pythonian4000 is now known as pythonian4000afk
|
|||
TimToady | well, not if the 2,3 are outside the parens, of course | 04:38 | |
BillN1VUX | 2 is the only even prime, hence it is the oddest prime. | 04:39 | |
TimToady | and it comes before all the others, so it's not even that way either | ||
diakopter | it's even the oddest even | 04:40 | |
TimToady | I am so tempted to just build in 2,3,5 ... * :) | ||
pmichaud | I've thought about that also :-) | ||
BillN1VUX | build in prime sequence ? | ||
pmichaud | but if you're doing that, just call it @prime :-) | ||
TimToady | which doesnt absolve us of the other problem | ||
but then we're forced to memoize it | 04:41 | ||
unless we implement the de-memoization function on arrays that are known to be constants :) | |||
"now they've used this @primes 3 times, so maybe we better not throw it away this time..." | 04:42 | ||
or just make constant arrays GCable if you're low on memory | |||
diakopter | heh. then they could be lazy and weak. | 04:43 | |
TimToady | I am looking forward to: constant @series = series_generator() | ||
pmichaud | that's likely to show up sooner rather than later :) | 04:44 | |
TimToady | so the compiler could actually look at the usage patterns and decide whether to memoize it | ||
infinite constants, yum | |||
probably need to sneak repeating fractions in there somewhere too :) | 04:45 | ||
BillN1VUX | 2,3,5 is not uniquely primes, could also be Fib(n+2) and likely others | ||
TimToady | constant pi = how_many_digits_do_you_want_today; | ||
yes, but we don't recognized fib | 04:46 | ||
BillN1VUX | yes, all the good constants are real | ||
TimToady | so you imagine | ||
BillN1VUX | yes but would be bad to recognize Fib(n+2) as primes | 04:47 | |
34 is not prime ... | |||
2 3 5 7 11 ... and 2 3 5 8 13 21 34 ... are distinctly different | 04:48 | ||
TimToady | we should reserve auto-dwim for series that are useful but difficult to write a function for | ||
fib doesn't qualify | |||
BillN1VUX | ok | ||
TimToady | course, neither do evens/odds under that criterion :) | ||
BillN1VUX | just saying autowim needs to NOT catch on too early | ||
TimToady | we discussed various approaches, and decide minimal was best, since you could always name a function for the fancy stuff | 04:49 | |
such as functions from a catalog | 04:50 | ||
BillN1VUX | right | ||
TimToady | but I think 2,3,5 might just be one that everyone recognizes as primes | ||
the real question is which serieses we're used to recognizing by exemplar rather than function | |||
BillN1VUX | just commenting on "I am so tempted to just build in 2,3,5 ... * " that maybe should be 2,3,5,7,11 ... * to be safe | 04:51 | |
TimToady | 2,4,6 and 1,3,5 certainly qualify under that | ||
and maybe 2,3,5 | |||
BillN1VUX | 2,3,5 being a subsequence of TWO famous sequences is not Obvious | 04:52 | |
TimToady | but not the start of two famous sequences, unless you start playing with your fib initial values | ||
BillN1VUX | 2,3,5,7 could be 2,(3,5,7 ... * ) | ||
Mathematicians flub with Fib init values regularly | 04:53 | ||
TimToady | yes, they flub with lotsa things that mere mortals think are pretty nailed down | ||
BillN1VUX | and shifting a sequence forward n steps is also frequently done in applied math applications | 04:54 | |
04:54
Axius left
|
|||
TimToady | well, I suspect intuiting should be limited to the first three in any case, so it's really 2,3,5 or nothing | 04:54 | |
BillN1VUX | nice thing about Fib is you can start in the middle | ||
then it's not safe | 04:55 | ||
pmichaud | I really like series, but there are times when I think we're a bit too high on the dwimminess part (more) | ||
if we need it, @primes is much more obvious than 2,3,5 ... * | |||
04:56
DiegoGrez left
|
|||
pmichaud | or even just primes() as a function | 04:56 | |
BillN1VUX | and @primes can be in Math::NumberTheory | ||
so those who don't need it don't have to lose a reserved word that they might use for whatever their prime datum is | 04:57 | ||
TimToady | doesn't really matter if it's in an outer lexical scope, they can always hide it | ||
BillN1VUX | building it in would kinda defeat the fun of golfing the rosetta anyway | ||
TimToady | point | 04:58 | |
pmichaud | if it's useful enough to build into ..., it's useful enough to be @primes :-) | ||
BillN1VUX | As I said, I really want to do it with >>%%<< not none(), although Larry'y readability comment is fabulous. | 04:59 | |
that or a Scheme-ish cached stream iterator that uses all prior primes to compute the next | 05:00 | ||
diakopter | ooo | 05:01 | |
BillN1VUX | I kind of dislike the none() leaking out of prime(). Is that allowed incase input was itself a superposition eg any ( $low .. $hi) ? | 05:02 | |
otherwise I'd collapse the wave function with a ' return ? ' | 05:03 | ||
sorear | TimToady: Exactly what values are legal to return from method foo() intended to be used as <.foo> ? | 05:04 | |
TimToady | Cursors | 05:05 | |
BillN1VUX | well so much for a quick email check and to bed. I knew getting into Rosetta Code would be a time sink ... | ||
sorear | TimToady: What about List with Cursors? Array with Cursors? Nil? Parcel? | ||
TimToady | sure, list of cursors, which can be empty | 05:06 | |
kinda silly to put cursors into an array, generally | |||
BillN1VUX | ( fyi for those who missed it upthread, reason I'm suddenly interested in Primes is the Boston.pm Rakudo demo next week. Gotta grind my Perl6 is lovechild of APL and Prolog axe a little. ) | 05:07 | |
sorear is trying to see just how generic the cursor-list-iterator-thing needs to be | |||
05:08
kaare joined,
Axius joined,
kaare is now known as Guest51121
|
|||
BillN1VUX | generic enough so the rho operator on www.dlugosz.com/Perl6/web/APL.html will work | 05:08 | |
? | |||
sorear | BillN1VUX: I'm talking about the p6regex implementation | 05:09 | |
BillN1VUX | ahh, regex not array. | ||
I saw work on S09 was spinning up and assumed those was iterators you meant. nevermind. | 05:10 | ||
TimToady | course we iterate lists and arrays similarly, but such cursors usually only return a single new cursor, unlike regex, that typically blow up | 05:11 | |
05:11
mberends left
|
|||
masak | where in the spec does it say "map is a control structure"? where in the spec does it say "for and map are isomorphic"? | 05:11 | |
S32/Containers paint 'map' as a very ordinary function. | |||
s/paint/paints/ | |||
sorear | S04 and S06 try to paint control structures as ordinary functions | 05:12 | |
I still have no clue how slurpy blocks are supposed to be implemented, fwiw | 05:13 | ||
05:15
Axius left
|
|||
BillN1VUX | it's all ordinary. when you explain all the DWIMery, it's not magic anymore. which is why children are not allowed on DisneyWorld backstage tours. | 05:15 | |
masak | right. I just don't want bad magic to happen to innocent people. | 05:16 | |
BillN1VUX | heh | ||
good night all. | 05:17 | ||
05:18
BillN1VUX left
05:19
Axius joined
|
|||
lue | [stupid question time replay] It's not mentioned much in S26, but is the Pod6:: organization system absolutely necessary for an external program? | 05:23 | |
masak | lue: is your question "if I implement Pod, do I have to use the class hierarchy?" | 05:25 | |
sorear | lue: Your question doesn't make sense to me. | ||
masak | if it is, I'd say "no". you could implement Pod and not use any classes at all. | 05:26 | |
sorear | Also, please don't write a standalone Pod6 implementation, we already have two very good ones | ||
masak | with that said, once you reach the point where you can do introspection, it'll be difficult to follow spec without something very much like those classes. | ||
sorear | one of them is used to generate the perl6 book pdf | ||
masak | sorear: that is news to me. I thought that was POD. | 05:27 | |
masak does a double take at the book | |||
sorear | actually it's "PseudoPOD", a "dialect of POD for writing books", which bears a more than passing resemblance to Pod6 | 05:28 | |
masak | ok, fair enough. | ||
I can see why you'd say that. | |||
sorear | they use different table markup, and only one of them has "=head0", but beyond that they appear to be the same | ||
masak | though '=end for' isn't valid Pod6. | 05:29 | |
and there doesn't seem to be an abbreviated block form. | |||
lue | I probably would end up doing some sort of hierarchy, I was just wondering if I had to use exactly what was described. | 05:31 | |
sorear | lue: In practice what will probably happen is that you or me will implement *some* hierarchy, then masak++ will get a grant to rewrite S26 to reflect reality | 05:33 | |
masak | lue: again, you'll find the answers to that in the areas of introspection. | ||
S26 already (mostly) reflects the reality of TheDamian's CPAN module. | |||
05:34
Axius left
|
|||
masak | also, I sincerely hope that as soon as I start my grant with the in-Rakudo Pod support, people like lue who want to write external tools, will join forces with me in some sense. | 05:34 | |
05:35
Guest51121 is now known as kaare_
|
|||
dalek | ecza: 705c3d8 | sorear++ | / (2 files): [nrx] Reimplement brackets |
05:37 | |
ecza: 6d0d084 | sorear++ | / (6 files): [nrx] Implement subrule calls |
|||
ok: 2f813e9 | masak++ | src/classes-and-objects.pod: [classes-and-objects] de-workarounded fixed #69240 |
|||
masak | my first book commit in ages. | ||
05:37
pythonian4000afk is now known as pythonian4000
|
|||
masak | I expect to do many more this week. starting with an enums chapter, finally. | 05:37 | |
sorear | I like the way that most of my [nrx] commits are delete-biased | 05:38 | |
05:38
pythonian4000 left
|
|||
lue | masak: I'll probably end up joining forces with you, by accident if not on purpose :) | 05:39 | |
masak | lue: :) | 05:41 | |
tylercurtis | masak: what's this about enums? | 05:45 | |
masak | tylercurtis: there was a long-standing memory-related bug that prevented a patch I had from being applicable without segfaulting Rakudo in some (common) cases. | 05:46 | |
tylercurtis: now it's fixed. | |||
also, I have this poker-hand example using enums that I'd like to put in the book. but it needs the patch. | |||
so my plan for this week is (1) re-review the patch, (2) apply it, (3) write the chapter. | 05:47 | ||
the re-review is needed because pmichaud had some good comments on the original patch, which triggered some new ideas. | |||
[backlog] interesting how the 'class-bound variables' discussion keeps resurfacing. | 05:52 | ||
people want those variables to be inherited, and the current mechanisms don't provide that. | 05:54 | ||
tylercurtis | Also interesting how often the planned use-case turns out not to need class data, but just class methods. | ||
masak | maybe the advice should be to use methods for that. | ||
sorear | masak: but the current mechanisms *do* provide that | ||
masak | with something like the slogan "data doesn't do method dispatch" to go with it. | ||
sorear: in what sense? | 05:55 | ||
sorear | our $.foo; defines an inheriting foo method backed by a class variable | ||
masak | indeed. | ||
sorear | our $.foo; in a subclass overrides it | ||
masak | aye. | ||
sorear | I even mentioned this earlier, but I was ignored | ||
05:56
TiMBuS left
|
|||
masak | it should be enough, and perhaps should be underlined more. | 05:56 | |
tylercurtis | sorear: I saw that. Thanks for pointing that out. | ||
tylercurtis didn't know about that. | |||
masak | maybe people stare themselves blind at the variable not inheriting. | ||
the private attribute, that is. | |||
sorear | I don't really like $!foo, fwiw | 05:58 | |
it feels like a big abstraction leak | |||
you should have to use the accessor, even in the defining class | |||
masak | what if the accessor is readonly? | 05:59 | |
05:59
TiMBuS joined
|
|||
masak | I think I agree that, in the general case, private access in public methods should be discouraged. | 05:59 | |
sorear | masak: that's really the point | ||
if I define a readonly attribute, I want a readonly attribute | 06:00 | ||
not an attribute that I can accidentally set in some way | |||
masak | I disagree. | ||
it makes a lot of sense to restrict attribute access to the class itself. | |||
tylercurtis | Sometimes, I want an attribute that's readonly internally as well as externally, but I also often don't. | ||
sorear | It makes sense to allow both ways | 06:01 | |
I find that readonly-everywhere is how I normally want my attributes, and think it should be default ;) | |||
masak | :) | ||
tylercurtis | sorear: it's all that Haskell going to your brain. :) | ||
masak | sorear: you just have to train yourself to use the dot, always. | 06:02 | |
tylercurtis | I would be in favor of a way to make an attribute internally even from within the class. I'm not sure I'm in favor of making that the default, though. | 06:03 | |
06:07
uniejo joined
|
|||
lue | The way I understand it [correct me when I'm wrong], when declared, $.a makes a public variable that can be accessed from beyond the class itself, and $!a makes a private variable that can't. When you use it, $.a goes through the variable's accessor, while $!a goes straight to the variable. | 06:14 | |
06:17
snearch joined
06:20
dju joined
|
|||
dalek | ecza: 773fb58 | sorear++ | / (2 files): [nrx] Reimplement :sigspace |
06:20 | |
ecza: 91d975d | sorear++ | / (4 files): [nrx] Reimplement / { } / |
|||
ecza: fe86829 | sorear++ | / (2 files): [nrx] Reimplement $/ and $¢ |
|||
ecza: b2c626c | sorear++ | / (3 files): [nrx] Reimplement character classes |
|||
06:20
stepnem left
06:24
stepnem joined
|
|||
masak blogged: use.perl.org/~masak/journal/40524 | 06:30 | ||
lue | masak++ for a good post [ I do believe it's the shortest post I've ever seen you make :) ] | 06:33 | |
masak | It was shorter in my mind. :) | 06:34 | |
lue | I have to say it feels... strange now that the pugs repo is gone. | 06:38 | |
masak | it'll take a while getting used to, I bet. | 06:39 | |
06:40
amkrankruleuen left
06:41
wtw joined
|
|||
lue | .oO(I bet it's a bit like how the Magratheans felt when they had to split Pangea for the better.) |
06:42 | |
pmichaud | I'm having to update all of my browser shortcuts. :-) | 06:43 | |
masak++ # a very appropriate.... epitaph | 06:44 | ||
the pugs repo definitely deserves recognition. | |||
lue | Has perlcabal.org/syn been updated ? | ||
pmichaud | lue: there are lots of things that need updating, alas. | 06:45 | |
lue | was the exact time the repo taken down mentioned? | 06:46 | |
06:48
snearch left
|
|||
lue | The Pugs Repository (svn.pugscode.org), deceased (with honors), September 4th, 2010. May he rest peacefully in /dev/null . | 06:51 | |
06:52
azert0x joined
|
|||
pmichaud | lue: I think the time can be deduced from the #perl6 log. | 06:53 | |
lue | yeah. .oO(about 5% of me wants to put an EPITAPH file in Mu or somewhere else) | 06:57 | |
sorear | but Mu isn't dead | ||
06:57
fridim joined
06:58
jhuni joined
|
|||
moritz_ | good morning | 06:59 | |
pmichaud | o/ | ||
moritz_ | still awake? | 07:01 | |
lue | Still, it feels too significant to say `it happened; let's move on' and move on. | 07:02 | |
pmichaud | still awake, yes. | 07:03 | |
...but probably not for long. | |||
07:05
amkrankruleuen joined
|
|||
lue | afk | 07:09 | |
tylercurtis | It looks as though Rakudo spectest "definitely lost" approximately 132,738 bytes on average per test. | 07:10 | |
moritz_ | tylercurtis: iirc rakudo skips global destruction, to avoid the inferior runloop problem on exit | 07:11 | |
07:11
pnu joined
|
|||
chromatic | It shouldn't, if it uses the ./perl6 binary. | 07:12 | |
tylercurtis is finally getting around to trying to analyze the valgrind spectest results (using Perl 5 this time) after realizing that Rakudo just can't handle that much data as of yet. | |||
moritz_ | note the 'exit 0' in src/Perl6/Compiler.pir line 230 | 07:13 | |
does parrot garbage-collect when the exit opcode is called? | |||
07:16
amkrankruleuen left,
amkrankruleuen joined
07:22
Getty left,
__sri left,
Getty joined,
broquaint joined
07:23
peters_mops joined,
_sri joined
07:24
amkrankruleuen left
|
|||
tylercurtis runs a test to check whether Rakudo indeed circumvents global destruction. | 07:24 | ||
moritz_ | tylercurtis: you can also try to comment out that 'exit 0', and see if it make a difference | 07:25 | |
chromatic | I'm pretty sure exit 0 has no bearing on global destruction. | 07:27 | |
moritz_ | so parrot does a normal teardown when it sees an 'exit 0' ? | ||
tylercurtis | Parrot throws a CONTROL_EXIT exception when it sees an 'exit 0'. | 07:28 | |
07:28
Trashlord joined
|
|||
tylercurtis has no idea how that is handled, though. | 07:29 | ||
chromatic | Unless you crash or call POSIX _exit(), you'll hit Parrot_really_destroy(). | ||
07:30
amkrankruleuen joined
|
|||
chromatic | From there, global destruction occurs if you have a YES_PLEASE_REALLY_DESTROY flag set. I forget the name, but pbc_to_exe enables it. | 07:30 | |
tylercurtis | PARROT_DESTROY_FLAG perhaps? | ||
07:31
echosystm left
|
|||
chromatic | That's right. | 07:34 | |
07:36
amkrankruleuen left
07:42
amkrankruleuen joined
07:44
foodoo joined
|
|||
masak | fellow gets two Perl 6 algorithms and one complaint into a tweet: twitter.com/philandstuff/status/23126569516 | 07:46 | |
oh, and one piece of praise, too. | |||
07:48
rhebus joined
|
|||
rhebus | morning | 07:48 | |
mathw | that's not really a complaint as a little impatience | ||
we could call Rakudo 1.0 if we wanted | |||
but that wouldn't make it any faster or more complete | |||
masak | nod. | 07:49 | |
mathw | Hi rhebus | ||
rhebus | I'm getting strange behaviour from gather/take. I imagine I just don't understand it. gist.github.com/566759 - three different take operands, three different results | ||
take $k vs take +$k vs take 0+$k | |||
masak | of course it's the things "1.0" implies he really wants. | ||
rhebus: you've discovered a known flaw of the current take. | 07:50 | ||
it's supposed to be 'decontainerized' upon take, but currently isn't. | |||
rhebus | aha, so all three expressions should give the same result then? | ||
(the correct result (3 3 5))? | 07:51 | ||
what does "decontainerization" mean anyway? | 07:53 | ||
pmichaud | currently "take" actually takes $k as a container | ||
07:53
amkrankruleuen left
|
|||
pmichaud | so if something subsequently changes the value of $k, then it's value appears to have changed in whatever it took | 07:53 | |
rhebus | so correct perl 6 behaviour is for take to take the value of $k is it? | 07:54 | |
pmichaud | yes | ||
rhebus | ok | ||
07:59
amkrankruleuen joined
|
|||
tylercurtis | nopaste.snit.ch/23241 # file-level numbers from the valgrind spectest backtraces. | 07:59 | |
Either tomorrow or Tuesday, I'll work on function- and line-level data. | |||
And then look at which call graphs lost memory. | 08:00 | ||
masak | tylercurtis++ | 08:01 | |
chromatic | I'm sure it's the method cache. | 08:04 | |
Some packfile annotations. | |||
tylercurtis | For now, good night, #perl6. | 08:06 | |
masak | 'night, tylercurtis. dream of memory-tight executions. | 08:12 | |
08:12
bacek joined
|
|||
masak likes both the alternatives at www.perlmonks.org/?node_id=160999 and the distribution of votes | 08:13 | ||
08:13
amkrankruleuen left
|
|||
masak | though I note now that that poll is from 2002. a more innocent age. that explains the lack of vitriol in the comments. | 08:14 | |
moritz_ | I guess you know www.perlmonks.org/?node_id=852336 ? | ||
masak | actually, I didn't. thanks. | 08:15 | |
oh wait, I've read it before. I recognize the comments. :) | 08:16 | ||
08:17
chromatic left
08:19
snearch joined,
amkrankruleuen joined
08:20
eternaleye joined,
aloha joined
08:21
tylercurtis left
08:24
Trashlord left
08:26
dakkar joined
08:27
snearch left
08:28
Mowah joined
08:29
amkrankruleuen left
08:30
Trashlord joined
|
|||
sorear | \o/ | 08:31 | |
Result: PASS | |||
moritz_ | niecza passes the spectest suite? :-) | ||
masak | :) | 08:32 | |
sorear | moritz_: nah, it's own tests | ||
moritz_ | still \o/ :-) | ||
dalek | ecza: 39a55eb | sorear++ | / (5 files): [nrx] Reinstate LTM |
||
ecza: 2eff169 | sorear++ | / (6 files): [nrx] Reinstate protoregexes and <sym> |
|||
ecza: cdc7790 | sorear++ | / (4 files): [nrx] Resore lookahead assertions |
|||
sorear | after ~completely rewriting the regex system | ||
masak | the trick is to have a small test suite :) | ||
sorear | 406 tests versus ~30,000 | ||
08:34
tadzik joined
|
|||
tadzik | good morning | 08:35 | |
masak | o/ | ||
tadzik | oh, masak! | ||
masak: I passed my exam \o/ | 08:36 | ||
masak | tadzik: \o/ | ||
sorear | speaking of testsuites... | ||
tadzik | I can hack now :) | ||
masak | tadzik: I passed mine, too! \o/ | ||
08:36
thebird joined
|
|||
tadzik | yay \o/ | 08:36 | |
masak | \o/ | ||
tadzik | now let's shamelessly play Druid :) | ||
masak | oh, you're planning to hack on Druid? I'm glad. | 08:37 | |
tadzik: want access to the commits I've made so far to make it run under the new master? | |||
tadzik | oh well | ||
masak: I'll fork it and try | |||
masak | tadzik: here they are, for what it's worth: github.com/masak/druid/commits/ng-compat | 08:38 | |
I remember getting as far as getting the tests running and failing. | |||
08:42
M_o_C joined
|
|||
moritz_ | rakudo: #= | 08:45 | |
p6eval | rakudo 77a72a: ( no output ) | ||
moritz_ | rakudo: 1; #= | 08:46 | |
p6eval | rakudo 77a72a: ( no output ) | 08:47 | |
08:47
M_o_C left
|
|||
moritz_ | rakudo: 1; #= foo bar | 08:47 | |
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Whitespace character is not allowed as a delimiter at line 22, near " foo bar"» | ||
moritz_ | std: 1; #= foo bar | ||
tadzik | masak: why the empty deps.proto file? | ||
p6eval | std 32123: OUTPUT«ok 00:01 114m» | ||
masak | tadzik: it used to be non-empty. | ||
moritz_ | looks like a rakudobug to me | 08:48 | |
masak | moritz_: it is. | ||
I *think* it's in RT somewhere. | |||
tadzik: Druid used to depend on Web.pm | 08:49 | ||
tadzik | my Rakudo seems to dislike #= | ||
moritz_ | tadzik: see above :-) | ||
tadzik | Druid compiles only without = | ||
a'right | |||
08:50
amkrankruleuen joined
|
|||
masak | tadzik: are you compiling off the ng-compat branch? | 08:50 | |
tadzik | oh-ho, ufo bug? | 08:51 | |
masak: yes | |||
make: *** No rule to make target `blib/lib/Druid/Webapp.pir', needed by `build'. Stop. | |||
masak | tadzik: re-run ufo. | ||
moritz_ | I had a fresh ufo run in the ng-compat branch, and it compiled fine after I removed those #= | ||
sjn | hey guys | 08:52 | |
tadzik | running tests. masak: are you commiting this fixed #=? | ||
hej sjn | |||
08:52
cjk101010 joined
|
|||
sjn | are there any good "Perl 6 demo" pages out there? | 08:53 | |
masak | tadzik: I'll investigate, yes. | ||
someone is welcome to fix Rakudo, too :) | |||
tadzik | :) | ||
sjn: try.rakudo.org maybe? | |||
sjn | demo pages, as in "places where perl 6 newbies can get a quick overview w/examples on what it's all about" | 08:54 | |
tadzik | it's not complete, but you can give it a try | ||
oh | |||
then yes, there are many :) Are you a Perl 5 programmer? | |||
sjn I am, but this isn't for me :) | 08:55 | ||
tadzik | szabgab.com/perl6.html#screencast -- if you lke screencasts | ||
sjn is preparing a stand/booth at JavaZone, to create some Perl visibility in the Java crowd | |||
tadzik | I find moritz_++ Perl 5 to 6 articles excellent. If you have some time on your hands, a Perl 6 book is nice too | 08:56 | |
tadzik thinks about extending perl6.org/documentation/ a bit | |||
masak | sjn: you should definitely chack out the book and the Perl 6 advent calendar. | 08:57 | |
sjn | masak: I'm actually looking for more of a "they, I didn't know Perl6 could do that" page | 08:58 | |
very short, attention grabbing, overview | |||
masak | I wrote a blog post with such examples a while back. | ||
hold on. | |||
sjn | ...to give all those Java n00bs motvation to dig a little further :) | ||
sorear | niecza has :: now | ||
masak | use.perl.org/~masak/journal/40459 | ||
sorear | this would have been unthinkable before last week's regex overhaul | 08:59 | |
tadzik | how does one use named regexes in current Rakudo? I always forgot | ||
sjn | masak: that's cool | ||
moritz_ | my regex foo { }; /<&foo>/ | ||
sjn | masak: would you mind updating that one and putting it somewhere with a nice url? :) | 09:00 | |
tadzik | oh, easy. Thanks moritz_ | ||
masak | sjn: updating? in what way? | ||
sjn | (actually, having a text like that at try.rakudo.org would be really cool) | ||
masak | sjn: I could put it on masak.org if that helps you. | ||
not sure what you count as a 'nice url'. | |||
sjn | masak: updating = check if it's all still good, add some of the more recent examples, and perhaps some of the really cool ones (where you can see how succinnct petl 6 can be) | 09:02 | |
masak | it's quite recent. I'm fairly sure all code in there still works. | ||
sjn | nice url = short, rememberable url suited for putting on a poster/wall/other very visible place | ||
masak | would a tinyurl be enough :) they're customizable. | 09:03 | |
moritz_ | perl6.org/showoff | ||
sjn | heheh | ||
perl6.org/cool | |||
masak | moritz_: 'showoff' as a noun has some, um, negative connotations :) | ||
dalek | ecza: 83c3bc3 | sorear++ | / (4 files): Implement :: and ::: |
||
baest | or perl6.org/OMGhowcool | ||
sjn | try.rakudo.org is nice though | ||
masak | or just 'omg' :) | ||
sjn | hehehehh | ||
masak | aye. ash++ | 09:04 | |
sjn | omg.perl6.org | ||
masak | :D | ||
+1 | |||
tadzik | heh, that's actually nice | ||
sjn | (paired with wtf.perl.org? :) | ||
tadzik | that'd be golf | ||
masak | maybe with 'omfsm.perl6.org' for the pastafarians out there. | ||
sjn | hehe | 09:05 | |
tadzik | . o O ( I have to alias maek to make in my shell ) | ||
moritz_ | it all depends... if you want a single page in perl6.org layout, perl6.org/omg is good | ||
sorear | the generated regex code for the JSON::Tiny grammar is 10-20x smaller (!) | ||
sjn | who does one prod in order to get that up and running before wednesday? | ||
moritz_ | if you want many pages with your own layout, a subdomain is much better | ||
in either case, I might be able to assist | 09:06 | ||
tadzik | Nominal type check failed for parameter '$m'; expected Match but got Proxy instead | ||
↑ I need a grammar wizard | |||
sjn | moritz_: that would be awesome | ||
tadzik | or a regex wizard in this case | ||
sjn is really swamped in organizing the other details of the stand | |||
masak | I'd like this format for an omg.perl6.org page: www.runciter.net/potion/ | ||
tadzik | sorear: niecza can compile and run JSON::Tiny? | ||
moritz_ | tadzik: means that you've accessed a non-existing part of an array or hash | ||
and try to pass it to something that expects a Match | 09:07 | ||
tadzik | hmm | ||
sorear | tadzik: a slightly mutilated version of it | ||
tadzik | that's ($m<&col_letter>) | ||
sorear: sounds great | |||
oh wait, that's something else | 09:08 | ||
moritz_ | tadzik: if you want it to capture, you need <col_letter=&col_letter> | ||
yes, that's fugly | |||
tadzik | yeah, that was this thing I keep forgettnig | ||
sjn | moritz_: shall we aim for omg.perl6.org? | ||
tadzik | but I think it's about (Match $m) in the signature actually | ||
moritz_ | and then accessing $m<col_lettere> | ||
sjn: I would have suggested to start with a single page, and only if it becomes too big we move it to a subdomain | 09:09 | ||
less work to get started | |||
sjn | moritz_: I was more thinking about establishing a url that's permanent enough to put on print | 09:10 | |
tadzik | moritz_: is it supposed to be fixed sooner than later? | ||
sjn | (we're printing wall sections tomorrow, and a short-and-sweet url would be nice, especially if we can use it for other purposes, and next year :) | ||
09:12
amkrankruleuen left
|
|||
sjn | moritz_: if you're up for it, we need to decide on the URL (and stick with that one), and get a basic text up on that URL (based on your blog post) before wed 08-sep-2010, at 06:00 UTC | 09:14 | |
moritz_: give me a go and an URL if you're up for it :) | 09:15 | ||
a* URL | |||
masak | tadzik: pushed comments fix to the ng-compat branch. | 09:19 | |
tadzik | okay | 09:20 | |
fixing regexes-methods is a bit over my head I'm afraid | 09:23 | ||
sorear | niecza is now ~6 times slower than viv | ||
need to, uh, optimize it now | 09:24 | ||
tomorrow | |||
sorear out | |||
masak | tadzik: that's where I got stuck as well. I suspect taking a step back and remembering the actual purpose will be required. :/ | 09:27 | |
09:32
amkrankruleuen joined
|
|||
sjn | moritz_: ping? | 09:36 | |
09:39
amkrankruleuen left,
amkrankruleuen joined
09:41
M_o_C joined
|
|||
moritz_ | sorry, had to run | 09:54 | |
moritz_ backlogs | |||
sjn: ok, let's say omg.perl6.org. I'll set up the virtual host later today | 09:55 | ||
sjn | moritz_: excellent | ||
sjn sends a mail to the designer. :) | 09:56 | ||
tadzik | what would you say about making some mess on perl6.org/documentation/? I'm thinking about diving the links to 2 or 3 sections -- one for absolute newcomers, maybe one for Perl 5 programmers, and one with tips and tricks for people knowing their way around. So one, like sjn, will just open the page and immediately see what he's looking for, without wondering what is what | 09:59 | |
moritz_ | tadzik: +1 | 10:00 | |
tadzik | masak: by the way, the methods in Druid::Base need to be has, not our | ||
moritz_: I'll need some html wizard assistance, but I can write the content meh-self | |||
s/write/organize/ | 10:01 | ||
masak | tadzik: yes. but that's not the only change required. | ||
tadzik | masak: yeah but that's a start :) | ||
moritz_ | tadzik: just group it as you want. There are two columns available, so two of the three sections will need to share a column | ||
tadzik | moritz_: where is it in the pugs^Wgithub repo? | 10:02 | |
moritz_ | tadzik: perl6/perl6.org path source/documentation/index.html | ||
tadzik | yeah, got it | 10:03 | |
10:07
proller joined
|
|||
tadzik | what is Onyx Neon Press book? | 10:11 | |
moritz_ | Using Perl 6 | ||
tadzik | leave just this? | 10:12 | |
moritz_ | renaming it would be better | ||
tadzik | I didn't know what the suffix is about | ||
moritz_ | Onyx Neon Press is our publisher | ||
and that was probably written before we had a title | |||
araujo getting back to his home within 2 days! | |||
sorear, you were pinging me earlier? :P | 10:13 | ||
tadzik | is u4x dead or just moved? | 10:24 | |
moritz_ | both :-) | 10:25 | |
it's in the mu repo for now | |||
tadzik | :) | ||
jnthn | Good afternoon #perl6 | ||
tadzik | to remove it for a while, comment out? | ||
jnthn is back from vacation :-) | |||
tadzik | yayitsjnthn! | ||
moritz_ | should eventually become its own repo | ||
lol it's jnthn | |||
tadzik | moritz_: so remove the link now? | ||
moritz_ | tadzik: works for me | 10:26 | |
tadzik | how about perl6-examples? They don't really work on recent Rakudo, do they? | 10:27 | |
10:28
fridim left
|
|||
moritz_ | some do, some don't | 10:29 | |
10:30
timbunce joined
10:31
fridim joined
|
|||
tadzik | how do I "compile" the page? I have to have mowyw installed somewhere, right? | 10:31 | |
10:34
daxim joined
10:36
ruoso left
10:39
Italian_Plumber joined
10:40
gfx left
10:42
bluescreen joined
10:43
bluescreen is now known as Guest89655
|
|||
tadzik | alright: tjs.azalayah.net/online/index.html -- suggestions? | 10:44 | |
There's only one thing for Perl 5 comers, so I decided not to make it a separate section | 10:46 | ||
10:50
agentzh left
|
|||
tadzik | tjs.azalayah.net/docs.html -- a bit reorganized stuff. Come on guys, where is the criticism? :) | 11:01 | |
bbkr | Where can I find spectests now? They were removed from Mu git repo | 11:03 | |
11:03
smash joined
|
|||
smash | hello everyone | 11:04 | |
masak | jnthn! \o/ | ||
jnthn: how was vacation? | |||
tadzik | bbkr: github.com/perl6/roast I think | ||
bbkr | tadzik: thanks | 11:05 | |
tadzik | bbkr: now what do you think about github.com/perl6/roast ? :) | ||
oops | |||
I meant tjs.azalayah.net/docs.html | |||
jnthn | masak! \o/ | 11:06 | |
masak: vacation was very nice, thanks. | |||
masak: Lots of great nom. | |||
A little wet now and then. | |||
:-) | |||
masak | wet nom? | ||
jnthn | No, wet weather. :P | ||
masak | ah :) | ||
jnthn tries to catch up with some of what's happened while he's been away | 11:07 | ||
11:08
envi^home joined
|
|||
bbkr | tadzik: very nice, bookmarked :) | 11:09 | |
11:09
constant left
11:12
ruiwk joined
|
|||
ruiwk | sorry...anyone develope iphone apps b4 ? | 11:13 | |
masak | jnthn: TimToady briefly considered adding for loops in signatures. :) | ||
frettled | tadzik: there seems to be a problem with line spacing and the dots under links; the dots touch the top of the text on the following line. | 11:14 | |
tadzik: tested with Safari and Firefox under MacOS | |||
smash | any nice way to write something like: multi f(@list where {+@list == 0}) { () } ? | 11:16 | |
*nicer | |||
frettled | tadzik: apart from those nitpicks, good work! | 11:17 | |
masak | smash: multi f([]) { () } | 11:19 | |
tadzik | frettled: I wasn't touching the html/css stuff, I was just reorganizing the content | 11:20 | |
smash | masak: will that one also be called for: my @a = (); ? | ||
tadzik | perl6.org/documentation/ isn't very straightforward to a newcomer imho | ||
masak | smash: provided I understand your question: yes, it will. | 11:21 | |
11:21
ruiwk left
|
|||
smash | masak: hmm, let me test and example | 11:21 | |
*an example | |||
frettled | tadzik: it definitively isn't | ||
masak | smash: 'my @a;' and 'my @a = ();' mean the same thing, unless you already have an initialized @a in that scope. | ||
tadzik | frettled: hence my reorganizations | ||
frettled | tadzik: perhaps it could improve even more by splitting the headers into separate boxes? | ||
tadzik | masak, jnthn, moritz_, what do you think? To commit, or not to commit? | 11:22 | |
smash | masak: it seems to work nicely, thank you | ||
tadzik | frettled: that's a work for a html wizard :) | ||
frettled: but that sounds more than good | |||
frettled | :) | ||
11:22
stepnem left
|
|||
masak | tadzik: you have my heartfelt approval. | 11:23 | |
frettled | Maybe I should take a look at that, I'm ill and home from work, so why not … :) | ||
moritz_ | tadzik: commit | ||
masak | frettled: aww. krya på dig. | ||
tadzik | lolpushed | ||
masak .oO( both lolpush and lolpop are O(n)... ) | 11:24 | ||
frettled | masak: tack! | ||
tadzik | moritz_: will it refresh itself? Rebuild, I mean | ||
moritz_ | tadzik: it should :-) | ||
at :30 | |||
11:24
stepnem joined
|
|||
tadzik | fine :) | 11:25 | |
moritz_ | the crontab has */15 in the 'minute' field | ||
frettled | How quickly does it get updated on github, usually? | 11:26 | |
11:27
whiteknight joined
|
|||
moritz_ | which "it"? | 11:28 | |
frettled | Pushes like tadzik's. | 11:29 | |
moritz_ | immediately | ||
frettled | hmm. Weird. | ||
frettled doesn't yet see it. | |||
moritz_ | github.com/perl6/perl6.org/ | ||
shows it | |||
frettled | Aha. | ||
frettled was in github.com/perl6/mu/tree/master/doc...perl6.org/ | |||
moritz_ | I should delete that | ||
masak | aye. | 11:30 | |
jnthn | masak: ...for loops?! :-) | 11:31 | |
moritz_ | done. | ||
masak | jnthn: ...but he figgered you might not like it :P | ||
jnthn: irclog.perlgeek.de/perl6/2010-08-30#i_2763349 | 11:33 | ||
11:34
hatseflats left
11:36
PerlJam left
|
|||
masak | feather outage? | 11:37 | |
11:37
dalek left,
Util left
|
|||
jnthn | masak: ooh, thanks for the clicky :-) | 11:37 | |
jnthn will read the mailing lists/RTs/blawgs, but has already given up on backlogging 10+ days worth. | 11:38 | ||
masak | :) | ||
jnthn | OK, the syntax just confuses me at first glance. :-) I'll have to look a bit further back than that to get the context. | 11:41 | |
masak | nod | 11:42 | |
same here. | |||
jnthn | ...oh, wow! | 11:43 | |
The Pugs repo is no more. | |||
moritz_ | RIP | ||
rhebus | long live github | ||
jnthn | moritz_++ # migration | 11:44 | |
pugs_repo++ # hosting so much awesome stuff | |||
juerd++ too of course :-) | |||
masak | au|irc++ # pugs repo | ||
jnthn | So many people to thanks :-) | ||
...OK, I have to ask...why "roast" for the test branch? :-) | |||
masak | jnthn: because TimToady likes tab completion. | 11:45 | |
jnthn | It makes me think of a beef roast. Om nom nom. | ||
masak | jnthn: 10 days. it's like, you've missed so much that it's almost impossible to fill you in on all the changes. :P | 11:47 | |
moritz_ | jnthn: the mem leak you helped finding before your vacations is now fixed | 11:48 | |
which means it's now possible again to run long-lived rakudo processes | |||
11:48
meppl joined
|
|||
frettled | Hmm, where is the thingy that builds the web pages? | 11:50 | |
11:50
constant joined,
constant left,
constant joined
|
|||
daxim | masak, moritz_, couldn't you have waited until today with publishing Mu? :( I figured out the cruft filtering | 11:50 | |
moritz_ | daxim: no :( | 11:51 | |
daxim | what's the matter? | ||
moritz_ | ENOPUGSSVN | 11:52 | |
daxim | what happened? | ||
moritz_ | it strained the server so much that we had to disable it | 11:53 | |
11:54
ruoso joined
|
|||
daxim | I need the authors file to do the proper conversion of committer id so it is useful for github, | 11:55 | |
or I can give you instructions and you run it on your machine or feather | |||
moritz_ | ah right; I was about to email the authors file to you when my local machine crashed :/ | ||
11:56
rokoteko joined,
cosimo joined
|
|||
tadzik | frettled: mowyw? | 11:59 | |
moritz_ should mv NOTES README and add a link to it | 12:00 | ||
frettled | tadzik: which is what? :) | ||
Ah, wait, found it. | 12:01 | ||
12:05
M_o_C left
12:06
pugssvn joined,
ChanServ sets mode: +v pugssvn,
dalek joined,
ChanServ sets mode: +v dalek,
M_o_C joined,
stepnem left
12:09
stepnem joined
12:10
hatseflats joined,
pmichaud joined,
dukeleto joined,
PerlJam joined,
Util joined
|
|||
masak | feather back up :) | 12:15 | |
12:15
bluescreen joined
12:16
bluescreen is now known as Guest84816
12:18
osfamero1 is now known as osfameron
12:30
Axius joined
12:32
_jaldhar_ joined,
jaldhar_ left
12:38
jaldhar joined
12:39
Juerd joined,
Italian_Plumber left
12:42
_jaldhar_ left
|
|||
sjn notes that omg.perl6.org resolves in DNS now :D | 12:46 | ||
moritz_ | sjn: it's a catch-all domain | ||
sjn | aah | ||
oh well | |||
12:50
Axius left
|
|||
jnthn | i.love.perl6.org/ # also :-) \o/ | 12:51 | |
masak | i.cuddle.up.with.perl6.org/ | ||
frettled | I think I may have grokked how to use mowyw at least half-way, as well as perform some CSS magic: www.ping.uio.no/~jani/perl6/perl6.o...mentation/ | ||
jnthn | masak: TMI :P | 12:52 | |
ooh, and my Hague Grant has been accepted \o/ | |||
frettled | jnthn: don't act so surprised about masak's love for Perl 6! | ||
masak | jnthn: \o/ | ||
frettled | jnthn++ | ||
moritz_ | frettled: that doesn't degrade well for narrow browser windows | ||
masak | moritz_: the perl6.org page never really did. | ||
frettled | moritz_: how narrow? | ||
moritz_ | frettled: too narrow to display the three boxes | 12:53 | |
masak | giveupandusetables.com/ | ||
frettled | moritz_: perl6.org breaks down, too | ||
masak: heh | |||
masak | really. | ||
moritz_ | there's a difference between "breaks up" and "hides some content" | ||
masak | also, www.eod.com/devil/archive/web_standards.html | 12:54 | |
moritz_ | the perl6.org doesn't look nice when viewed with a narrow browser window, but the information is still accessible | ||
masak | having it look nice on a very large percentage of browsers is only a usage of tables away. | 12:55 | |
moritz_ | anyway, if people want to push that, I won't stop them | 12:56 | |
I made my point, others can consider how important it is for them | |||
frettled | I think it's possible to make the boxes resize themselves. | ||
I'll look into that. | |||
jnthn | masak++ # pragmatism/jfdism :-) | 12:57 | |
tadzik | frettled++! | ||
smash | jnthn++ # Hague Grant accepted | 12:58 | |
moritz_ | TPF++ # accepting jnthn++'s grant :-) | 12:59 | |
gfldex | std: multi sub prefix:<.>(Str $name){say "Perl 6 loves $name!";} . 'you'; | 13:00 | |
p6eval | std 32123: OUTPUT«===SORRY!===Unsupported use of . to concatenate strings; in Perl 6 please use ~ at /tmp/CQW4jQw7MD line 1:------> tr $name){say "Perl 6 loves $name!";} . ⏏'you';Parse failedFAILED 00:01 124m» | ||
gfldex | something eaten me heart :( | ||
moritz_ | std: multi sub prefix:<heart>(Str $name){say "Perl 6 loves $name!"}; heart 'you' | 13:03 | |
p6eval | std 32123: OUTPUT«ok 00:01 123m» | ||
moritz_ | rakudo: multi sub prefix:<heart>(Str $name){say "Perl 6 loves $name!"}; heart 'you' | ||
p6eval | rakudo 77a72a: OUTPUT«Perl 6 loves you!» | ||
gfldex | gist.github.com/567010 | 13:04 | |
masak | rakudo: multi sub prefix:<♥>(Str $name){say "Perl 6 loves $name!"}; ♥ 'you' | ||
p6eval | rakudo 77a72a: OUTPUT«Perl 6 loves you!» | ||
masak | In Soviet Russia, YOU love Perl 6! | 13:05 | |
sjn | is it possible to define an infix operator that has a default (ignorable) left side? | ||
</noob> | |||
moritz_ | btw mfollett++ made a pull request for book, adding a section on inheritance | 13:06 | |
masak | sjn: sounds like you want a prefix that defers to an infix. | ||
moritz_ | I like it | ||
any objections to merging? | |||
masak | moritz_: no objections. go ahead. | ||
moritz_ | (I've given some feedback, which resulted in the current version) | ||
masak | sounds excellent. | 13:08 | |
I plan to have a read through the book during the week. | 13:09 | ||
moritz_ | \o/ | ||
tell us what you find :-) | |||
aloha | OK. I'll deliver the message. | ||
13:09
orafu left
|
|||
moritz_ | aloha-- | 13:09 | |
aloha | moritz_: Pbbbbtt! | ||
13:09
orafu joined
|
|||
jnthn | tell me why we have another message bot... | 13:10 | |
aloha | OK. I'll deliver the message. | ||
masak | lol | ||
jnthn | phenny: You're so much better :-) | ||
frettled | hugme: hug phenny | ||
no hugme? | |||
:( | |||
moritz_ | jnthn: I think bacek++ brought aloha here because we had no 'seen' functionality | ||
masak | aloha: THIS IS WHY WE CANNOT HAVE NICE THINGS! | 13:11 | |
aloha | masak: Okay. | ||
jnthn | seen functionality? | ||
13:11
hugme joined,
ChanServ sets mode: +v hugme
|
|||
aloha | Sorry, I haven't seen functionality. | 13:11 | |
masak | lol | ||
jnthn | <snort> | ||
masak | seen Jesus | ||
aloha | Sorry, I haven't seen Jesus. | ||
masak neither | 13:12 | ||
dalek | ok: 1512265 | (Matt Follett)++ | src/classes-and-objects.pod: Added a section on single inheritance |
||
book: dd5cd17 | (Matt Follett)++ | / (2 files): | |||
book: Merge branch 'master' of github.com/perl6/book | |||
13:12
dalek left
|
|||
masak | seen us? | 13:12 | |
aloha | Sorry, I haven't seen us. | ||
masak | seen bigfoot? | ||
jnthn | Tssk, doesn't even know basic English. | ||
aloha | Sorry, I haven't seen bigfoot. | ||
13:13
dalek joined,
ChanServ sets mode: +v dalek
|
|||
masak | seen basicEnglish? | 13:13 | |
aloha | Sorry, I haven't seen basicEnglish. | ||
moritz_ | seen anything? | ||
aloha | Sorry, I haven't seen anything. | ||
masak | lol | ||
seen nothing? | |||
aloha | Sorry, I haven't seen nothing. | ||
masak | seen Higgs? | ||
aloha | Sorry, I haven't seen Higgs. | ||
moritz_ | is Higgs still alive? | ||
masak | seen aloha? | ||
aloha | aloha was last seen in #perl6 4 hours 53 mins ago joining the channel. | ||
huf | well that's odd | 13:14 | |
jnthn | ...I've seen aloha a lot more than that. | ||
masak | seen tooMuch? | ||
aloha | Sorry, I haven't seen tooMuch. | ||
masak | seen sense? | ||
aloha | Sorry, I haven't seen sense. | ||
huf | there has to be a pun in this somewhere... | 13:15 | |
rhebus | seen theLight? | ||
aloha | Sorry, I haven't seen theLight. | ||
13:15
kaare_ left
|
|||
masak | seen thePoint? | 13:15 | |
aloha | Sorry, I haven't seen thePoint. | ||
tadzik | aloha: seen pun? | ||
aloha | tadzik: Sorry, I haven't seen pun. | ||
masak | seen Godot? | 13:16 | |
aloha | Sorry, I haven't seen Godot. | ||
rhebus | pfft, cultural | ||
masak | seen 2011? | ||
aloha | Sorry, I haven't seen 2011. | ||
moritz_ | bot abuse! | 13:17 | |
rhebus | seen enoughYet? | ||
aloha | Sorry, I haven't seen enoughYet. | ||
masak | I'd argue that among these, at least 'tell me' needs to be special-cased. | 13:18 | |
(so that aloha doesn't butt in when grownups are talking) | |||
moritz_ | I'd argue that a bot should only respond to commands directed at it. | ||
masak | yes, me too. | ||
that'd be even better. | |||
13:20
agentzh joined
|
|||
jnthn | Aye, aloha is too noisy | 13:20 | |
For #perl6, anyways. | |||
masak | she won't make it here without adapting. | ||
tell me when you've adapted, aloha | 13:21 | ||
aloha | OK. I'll deliver the message. | ||
masak | :) | ||
rhebus | tell aloha to shut up | ||
aloha | OK. I'll deliver the message. | ||
masak | aloha: that's just wrong. | ||
13:26
Axius joined
|
|||
smash | can anyone tell me what i'm doing wrong in this MMD example gist.github.com/567037 ? | 13:28 | |
13:30
uniejo left
|
|||
moritz_ doesn't get it | 13:30 | ||
13:30
M_o_C left
|
|||
masak | smash: unable to reproduce your error. | 13:31 | |
smash: are you using a seriously old Rakudo, perchance? | |||
gfldex | try my @b = 1,2,3; instead of my @b = (1,2,3); | 13:32 | |
that should not change anything tho :) | |||
13:32
uniejo joined
|
|||
masak | ...and it doesn't. | 13:32 | |
smash | masak: git pull is 'Already up-to-date.' | ||
masak | oh wait | 13:33 | |
didn't have the last line... :/ | |||
yep, getting it too now. | |||
masak submits rakudobug | 13:34 | ||
szbalint | heh. when I was writing my first Perl 6 program I accidentally executed it with Perl 5. The error puzzled me for half an hour. | ||
masak | szbalint: use v6 | ||
moritz_ | szbalint: that's why... what masak++ said | ||
:-) | |||
szbalint | yeah, I should. | ||
masak | you just learned it the hard way :) | 13:35 | |
moritz_ | szbalint: but when you use it a lot, you learn to distinguish the error messages from p5 and p6 | ||
szbalint | yeah. hopefully I will soon. | ||
13:35
uniejo left
|
|||
masak | rakudo: multi f([]) {}; multi f(@a) {}; f(my @b = 1, 2, 3) | 13:35 | |
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Redeclaration of symbol @b at line 22, near " = 1, 2, 3"» | ||
frettled | moritz_: New and possibly improved: www.ping.uio.no/~jani/perl6/perl6.o...mentation/ | 13:36 | |
jnthn | That's a weird mmd fail... | ||
13:37
M_o_C joined
|
|||
jnthn | Will look more later on. | 13:37 | |
szbalint | jnthn: back from holiday? | ||
moritz_ | frettled++ # much better | 13:38 | |
masak submits rakudobug | 13:39 | ||
not the effect I sought to reproduce. | |||
jnthn | szbalint: Yes, arrived back on the sleeper train this morning. :-) | ||
masak | rakudo: multi f([]) {}; multi f(@a) {}; my @b = 1, 2, 3; f @b | ||
p6eval | rakudo 77a72a: OUTPUT«No applicable candidates found to dispatch to for 'f'. Available candidates are::(Positional ()):(@a) in main program body at line 22:/tmp/rYSqpp_pYJ» | ||
jnthn | rakudo: multi f(@a) {}; my @b = 1, 2, 3; f @b | 13:40 | |
p6eval | rakudo 77a72a: ( no output ) | ||
jnthn | ... | ||
wtf. | |||
13:42
_jaldhar joined
|
|||
moritz_ | rakudo: multi f(@a) {}; my @b = 1, 2, 3; f @ | 13:42 | |
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at line 22, near "@"» | ||
moritz_ | rakudo: multi f(@a) {}; my @b = 1, 2, 3; f @b | ||
p6eval | rakudo 77a72a: ( no output ) | ||
jnthn | Seems adding the extra cand with the sub-sig busts it. | 13:43 | |
moritz_ thinks he's seen a similar bug before | 13:44 | ||
cognominal was involved back then, I think | |||
masak | rakudo: multi f(Int $a) {}; multi f($b) {}; f(my $x = 42) | 13:45 | |
p6eval | rakudo 77a72a: ( no output ) | ||
masak | rakudo: multi f(Int $a) {}; multi f($b) {}; f(my @x = 42) | ||
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Redeclaration of symbol @x at line 22, near " = 42)"» | ||
13:46
jaldhar left
|
|||
jnthn | rakudo: foo(my @x = 42) | 13:47 | |
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Redeclaration of symbol @x at line 22, near " = 42)"» | ||
jnthn | declaration in args = kaboom, it seems | ||
frettled | moritz_: yay (docs page). Do I have a commit bit? (I forgot how to find out on github) | ||
moritz_ | frettled: what's your github ID? | 13:49 | |
frettled | moritz_: jani | ||
moritz_ | frettled: you now have | ||
13:49
JimmyZ joined
|
|||
masak | jnthn: I"ll add that to the ticket. | 13:51 | |
13:52
M_o_C left
|
|||
jnthn | masak++ | 13:52 | |
masak | rakudo: foo(my @x) | ||
p6eval | rakudo 77a72a: OUTPUT«Could not find sub &foo in main program body at line 22:/tmp/CwOH4cdJb6» | ||
masak | array declaration and assignment | 13:53 | |
jnthn | oh | ||
rakudo: foo(my $x = 42) | |||
p6eval | rakudo 77a72a: OUTPUT«Could not find sub &foo in main program body at line 22:/tmp/YvnUwacDXA» | ||
jnthn | rakudo: foo(my @x = 42) | ||
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Redeclaration of symbol @x at line 22, near " = 42)"» | ||
jnthn | rakudo: foo(my %x = 42) | ||
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Redeclaration of symbol %x at line 22, near " = 42)"» | ||
moritz_ | some $*IN_DECL leakage? | ||
frettled | moritz_: tee-hee :D Thanks! | ||
jnthn | rakudo: foo(bar() = 42) | ||
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22» | ||
13:53
amkrankruleuen left,
amkrankruleuen joined,
M_o_C joined
|
|||
jnthn | moritz_: That or $*LEFTSIGIL oddness | 13:53 | |
moritz_: It's interesting that it only happens when it's list assignment. | 13:54 | ||
13:54
sftp joined
13:56
Axius left
13:57
Guest23195 joined
13:59
javs joined
14:01
whiteknight left
|
|||
frettled | moritz_: yay. I think I even managed to push my changes correctly. | 14:03 | |
moritz_ | \o' | 14:04 | |
masak | rakudo: class A { method foo(::G $self:) { say G.perl } }; class B is A {}; .new.foo for A, B | 14:09 | |
p6eval | rakudo 77a72a: OUTPUT«AB» | ||
14:11
JimmyZ left
|
|||
masak | rakudo: class A { method bar(::G $self: G $other) { say "yay!" } }; class B is A {}; B.new.bar(B.new); A.new.bar(A.new); A.new.bar(B.new); B.new.bar(A.new) | 14:12 | |
p6eval | rakudo 77a72a: OUTPUT«yay!yay!yay!Constraint type check failed for parameter '$other' in 'A::bar' at line 22:/tmp/iV8EV6SMdo in main program body at line 22:/tmp/iV8EV6SMdo» | ||
masak | \ø/ | ||
jnthn | happy and wearing a bandana? :-) | 14:13 | |
masak | mhm | ||
frettled | have a banana | 14:17 | |
masak | om nom nom | ||
moritz_ | thanks for reminding me that I brought some tasty grapes... :-) | 14:19 | |
14:21
javs left
|
|||
jnthn hadn't ever mentally associated bandanas and bananas... | 14:21 | ||
masak | rakudo: class Grape { our $.ommed is rw = False; method nom { say $.ommed++ ?? 'om' !! 'nom' } }; my @grapes = map { Grape.new }, ^4; @grapes>>.nom | ||
p6eval | rakudo 77a72a: OUTPUT«Method 'ommed' not found for invocant of class 'Grape' in 'Grape::nom' at line 22:/tmp/CKVYGvYoAN in main program body at line 22:/tmp/CKVYGvYoAN» | ||
masak | :/ | ||
rakudo: class Grape { our $ommed is rw = False; method nom { say $ommed++ ?? 'om' !! 'nom' } }; my @grapes = map { Grape.new }, ^4; @grapes>>.nom | |||
jnthn | our? | 14:22 | |
p6eval | rakudo 77a72a: OUTPUT«nomomomom» | ||
14:22
Kodi joined
|
|||
masak | dang, backwards. :) | 14:22 | |
rakudo: class Grape { our $ommed is rw = False; method nom { say $ommed++ ?? 'nom' !! 'om' } }; my @grapes = map { Grape.new }, ^4; @grapes>>.nom | |||
p6eval | rakudo 77a72a: OUTPUT«omnomnomnom» | ||
masak | \o/ | ||
jnthn: yes, we discussed class attributes again this morning. | |||
jnthn: sorear++ pointed out that 'our $.classattr' will have an inheritable method, which is what most classattrists want. | 14:23 | ||
Kodi | Can anyone review or apply rt.perl.org/rt3//Public/Bug/Display...l?id=77560 for me? | 14:24 | |
moritz_ | rakudo: class Grape { has $!ommed = False; method nom { say $!ommed++ ?? "nom" !! "om" } }; (Grape.new xx 4)>>.nom | ||
p6eval | rakudo 77a72a: OUTPUT«omnomnomnom» | ||
masak | moritz_: you just ate the same grape four times! | ||
moritz_ | masak: I ate it once, and savoured it another three times :-) | 14:25 | |
masak | :) | ||
Kodi: I have this feeling that I've been neglecting you lately. if so, I apologise. | |||
Kodi: I can take a look at the patch. | 14:26 | ||
Kodi | masak: Thanks. | 14:27 | |
jnthn | masak: Yes, my $.classattr would also do that, just keep it more tightly scoped. | 14:29 | |
masak: If there's what we want to make my $.foo and our $.foo mean anyway | |||
Works for me - we used to have it that way iirc. | |||
masak | jnthn: aye. | 14:30 | |
I think I've gained some additional insight lately in how all the various parts of OO attributes fit together. I'm quite happy with it all. | 14:31 | ||
there's has/my/our, there's dot twigil/bang twigil, there's (is readonly)/is rw. | |||
hm, should add 'no twigil' on the middle axis to make it complete. | 14:32 | ||
14:32
jhuni left
14:33
javs joined
|
|||
masak | Kodi: the patch looks very good to me. | 14:33 | |
jnthn | masak: If there's consensus that my/our + . twigil is just a variable + a method that accesses it, I can easily get Rakudo to do that again. | ||
Kodi | masak: Great. | ||
masak | jnthn: oh, I think S12 says so already. | ||
jnthn | masak: I'm more curious what my $!foo and our $!foo would mean though. | ||
masak | jnthn: my bet is that they're just ordinary (though funny-looking) variables. | 14:34 | |
jnthn: S12:736 | |||
14:38
risou joined,
patrickas joined
14:40
rhebus left
|
|||
patrickas | rakudo: say ~(2,3,5,7 ... 4); | 14:44 | |
p6eval | rakudo 77a72a: OUTPUT«(timeout)» | ||
14:45
mj41_ joined,
tylercurtis joined
14:46
mj41_ is now known as mj41
|
|||
patrickas | I am pretty sure the previous series example was working | 14:47 | |
14:48
armicron joined
14:50
wtw left
14:53
Kodi left
14:59
mj41 left
15:02
mj41 joined
|
|||
patrickas | actually maybe not ... | 15:05 | |
15:12
M_o_C left
15:13
M_o_C joined
15:15
mj41_ joined,
mj41 left,
mj41_ is now known as mj41
|
|||
tylercurtis | nopaste.snit.ch/23242 # function-level numbers from the valgrind spectest run. | 15:17 | |
moritz_ | so the big part is packfiles | 15:20 | |
15:21
mj41_ joined
|
|||
tylercurtis | Not necessarily. One thing to note is that those numbers repeatedly count the same lost memory for each level in a backtrace. | 15:21 | |
moritz_ | I guess calloc only appears high on that list because most lost memory was allocated through it | 15:23 | |
tylercurtis | PackFile_Segment_unpack in particular frequently shows up multiple times in a single backtrace. | ||
15:24
mj41 left,
mj41_ is now known as mj41
|
|||
moritz_ | does that increase only the appearance count, or also the number of bytes lost? | 15:24 | |
tylercurtis | Both currently (though I could easily change that). | ||
moritz_ | patrickas: the commit list in your latest pull request is both impressive and confusing | 15:29 | |
15:31
stepnem left
15:32
sahadev joined
15:33
stepnem joined,
javs left
15:34
icwiener joined
|
|||
moritz_ | patrickas: cherry-picking the relevant commits into a branch would certainly help | 15:34 | |
15:35
risou_ joined
15:37
risou left
15:39
mj41_ joined,
Ross^ joined
15:41
rindolf joined
15:43
mj41 left
|
|||
pmichaud | good morning, #perl6 | 15:43 | |
15:43
mj41_ is now known as mj41
|
|||
pmichaud | jnthn: o/ | 15:43 | |
moritz_ | \o | ||
masak | gm, pm | ||
sjn | Anyone here want to comment on the Perl6 poster that's been made for Oslo.pm today? dl.dropbox.com/u/3809132/JavaZone/P...00_NY2.pdf | 15:44 | |
sjn is being a little cheeky with the concept here :-9 | |||
moritz_ | for Perl 6 you need camelia!!!!11! | 15:45 | |
pmichaud | sjn: I like it. I'd go. :-) | ||
sjn | moritz_: we'll put the omg.perl6.org url in the flyer (iow, we're still on for that) | ||
masak | std: class A {}; my $a = new A: | ||
p6eval | std 32123: OUTPUT«ok 00:02 119m» | ||
15:45
ashleydev joined
|
|||
masak | rakudo: class A {}; my $a = new A: | 15:45 | |
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Confused at line 22, near "my $a = ne"» | ||
masak submits rakudobug | |||
sjn | is there any high-res or vector image of camelia anywhere? | 15:46 | |
moritz_ | didn't std.pm carp about obsolete use of C++ constructor about this one? | ||
masak | moritz_: note colon at end | ||
tylercurtis | moritz_: it's just indirect object syntax. | ||
pmichaud | sjn: github.com/perl6/mu/blob/master/misc/camelia.svg | ||
moritz_ | sjn: github.com/perl6/mu/tree/master/misc/ there are .svn and .pdf files | ||
oh. | |||
masak | rakudo: class A { method foo { say "OH HAI" } }; foo A.new: | 15:47 | |
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Confused at line 22, near "foo A.new:"» | ||
masak | rakudo: class A { method foo { say "OH HAI" } }; my $a = A.new; foo $a: | ||
p6eval | rakudo 77a72a: OUTPUT«===SORRY!===Confused at line 22, near "foo $a:"» | ||
15:47
agentzh left
|
|||
pmichaud | afaik, rakudo doesn't grok indirect object syntax yet | 15:47 | |
patrickas | moritz_: I will try to do that | 15:48 | |
moritz_ not sure that syntax is a good idea | |||
masak | pmichaud: it used to, though, right? | ||
sjn | moritz_: thanks | ||
moritz_ | alpha: class A { method foo { say "OH HAI" } }; foo A.new: | 15:49 | |
p6eval | alpha 30e0ed: OUTPUT«Confused at line 10, near ":"in Main (file <unknown>, line <unknown>)» | ||
pmichaud | masak: I don't think we ever handled indirect object syntax, no. | ||
masak | ok. | 15:50 | |
marking it as TODO, then. | |||
15:59
envi^home left
|
|||
x3nU | is there something like $^O in perl6/rakudo | 16:02 | |
? | |||
i want detect operating system | |||
moritz_ | rakudo: say $*OS | ||
p6eval | rakudo 77a72a: OUTPUT«linux» | ||
x3nU | thanks | ||
jnthn | pmichaud: o/ | 16:03 | |
pmichaud: Hope all is well. :-) | 16:04 | ||
pmichaud | jnthn: it is. Good holiday? | ||
16:05
synth joined,
armicron left
|
|||
jnthn | pmichaud: Yes. Outstanding food, some beautiful places, and some nice mountain walks too, though getting snowed on during summer vacation was a slight novelty. :-) | 16:05 | |
patrickas | moritz_: I got EGITNOOBFAIL while trying to cherry pick in a branch :-( | 16:07 | |
jnthn \o/ welcome back from vacation! | |||
jnthn | o/ patrickas | 16:08 | |
moritz_ | patrickas: if you have a list of sha1 sums somewhere, I could give it a try | ||
16:10
synth left
16:28
Ross^ left
|
|||
TimToady | rakudo: my $x = 100; say 'The $100 answer is \qq[$x]'; # NYI | 16:28 | |
p6eval | rakudo 77a72a: OUTPUT«The $100 answer is \qq[$x]» | ||
jnthn | ...you can do that? | 16:29 | |
jnthn thought ' was always rather less magical. | |||
moritz_ thought ' only allowed \ and ' escaping | |||
TimToady | std: $^O | ||
moritz_ | std: 'foo \qq[$x]' | ||
p6eval | std 32123: OUTPUT«===SORRY!===Unsupported use of $^O variable; in Perl 6 please use $?OS or $*OS at /tmp/LTL3zcDbh1 line 1 (EOF):------> $^O⏏<EOL>Parse failedFAILED 00:01 114m» | ||
std 32123: OUTPUT«===SORRY!===Variable $x is not predeclared at /tmp/9oOcmZtRDs line 1:------> 'foo \qq[$x⏏]'Check failedFAILED 00:01 116m» | |||
moritz_ | rakudo: $^O | ||
p6eval | rakudo 77a72a: ( no output ) | 16:30 | |
16:30
alester joined
|
|||
TimToady | x3nU: std will usually tell you what the new thing is if you try to use a P5 variable | 16:31 | |
jnthn | moritz_: Same, and I'd prefer it did. | ||
At least then if you're reading code and you see ' quotes, you know you can easily skip what is inbetween as purely literal. | 16:32 | ||
moritz_ | indeed | ||
TimToady | no '' is for minimal interpolation, and it includes a very rare sequence for \qq | 16:33 | |
if you really want to skip, use Q | |||
moritz_ | Perl 6 - never as simple as you think | ||
TimToady | this makes it handy to put in a large chunk of program with just a few interpolations, which Perl 5 can't do without s/// | 16:34 | |
daxim | moritz_, 103 MB -- daxim.ath.cx/Mu-svn32126.tar.bz2 | 16:35 | |
you still 1) need to filter the git authors - this is very easy stackoverflow.com/questions/392332#392427 | |||
2) reapply the commits made since you gave me the svn tar | |||
3) profit | 16:36 | ||
moritz_ | daxim: thanks. I'm wondering if I should push it as a forced update | ||
(and maybe warn the world) | |||
daxim | that won't work at all, so delete the existing repo, and warn the world that they have to clone from scratch | 16:37 | |
moritz_ | iterate for ~8 repos that are spawned from mu | ||
fun | |||
daxim | you didn't say anything about that :-| | ||
moritz_ | sorry; I was very busy and distracted with all that fallout | 16:39 | |
daxim | www.kernel.org/pub/software/scm/git...#_examples # see --subdirectory-filter | ||
moritz_ | that's what I used for spawning those repos off, yes | 16:40 | |
daxim | excellent. before you push, do the usual housekeeping: git reflog expire --all --expire=now ; git gc --aggressive ; git prune ; git fsck --full | 16:41 | |
16:41
risou_ left,
masak left
|
|||
daxim | I'm off to meet the lambdaheads, gonna fix some ghc compiler warnings in pugs tonight if I can :) | 16:42 | |
Juerd | feather1 now has ipv6. It's experimental and doesn't do reverse DNS yet | 16:43 | |
16:43
daxim left
|
|||
Juerd | Please let me know your experiences :) | 16:43 | |
s/doesn't do/doesn't have/ | |||
16:48
au|irc left
16:52
stepnem left,
rhebus joined
|
|||
aloha | rhebus: rhebus asked me to tell you foo | 16:52 | |
rhebus: rhebus asked me to tell you what's up | |||
rhebus: rhebus asked me to tell you hello | |||
rhebus: rhebus asked me to tell you bim | |||
Juerd | First surprise so far: apache2 won't listen on ipv6 | ||
16:53
stepnem joined
|
|||
rhebus | sorry guys, was investigating aloha's messaging earlier... | 16:53 | |
moritz_ | Juerd: that's surprising indeed. I know of several sites that use apache2, an that work without problem with ipv6 | ||
but maybe it needs non-trivial setup magic | 16:54 | ||
moritz_ -> gone | |||
rhebus | i dread to think what would happen if someone with nick "me" or "us" enters the channel, i think aloha would have a fit | ||
Juerd | With explicit addresses, it will run | ||
florz | apache2 works just fine with ipv6 | 16:55 | |
Juerd | But with the catch-all address ::, it says the address is already in use | ||
Which netstat does not confirm, by the way | |||
Oh well, explicit address is good enough for now. | |||
florz | have it running for many years listening on v6 | ||
Juerd | florz: On ::? | ||
16:55
rgrau left
|
|||
florz | tcp6 0 0 :::80 :::* LISTEN 16145/apache2 | 16:56 | |
! | |||
Juerd | florz: What Listen line are you using? | ||
I tried Listen 80, Listen :::80 and Listen [::]:80 | |||
florz | /etc/apache2/ports.conf:Listen 80 | ||
Juerd | Maybe it can't work because of the explicit ipv4 addresses configured | 16:57 | |
16:57
au|irc joined
|
|||
florz | yeah, probably | 16:57 | |
:: tends to (depends on the OS and stuff) bind v4-mapped addresses as well | |||
Juerd | Anyway, feather.perl6.nl/cgi-bin/whoami now properly tells me I'm on 2a02:2308:10:7f::5 :) | ||
florz: Ah, that must be it then. | 16:58 | ||
16:59
Ross joined
|
|||
florz | Juerd: it doesn't want to tell me - but if I can trust netstat, my firefox is connecting via v6 just fine as well ;-) | 17:00 | |
17:00
araujo left
17:01
araujo joined
17:02
synth joined,
dakkar left
17:03
Axius joined
17:04
thebird left,
araujo left
|
|||
lue | ohai o/ | 17:04 | |
Juerd | florz: Yea, the cgi scripts require a feather account :) | 17:05 | |
Hi | |||
17:05
araujo joined
17:08
timbunce left
17:12
Guest89655 left
17:15
timbunce joined
17:19
DiegoGrez joined
17:20
timbunce left
17:25
M_o_C left
17:31
alester left
17:35
whiteknight joined
17:39
Axius left
17:40
Axius joined
|
|||
TimToady | github.com/perl6/specs/commit/a826b...7f3502dcdb | 17:44 | |
17:44
rgrau joined
|
|||
TimToady | [S04,S32] implicit loops expect to be controlled by bare next and last | 17:44 | |
TimToady fakes dalek | |||
17:44
Trashlord left
|
|||
moritz_ | TimToady++ | 17:45 | |
diakopter | urp | 17:46 | |
17:46
Trashlord joined
17:47
Axius_ joined,
Axius left
|
|||
pmichaud | TimToady++ | 17:48 | |
17:48
dalek left,
dalek joined,
ChanServ sets mode: +v dalek,
constant left,
constant joined,
constant left,
constant joined
|
|||
moritz_ | I'm discussing dalek options with Infinoid++ over in #parrot | 17:49 | |
diakopter | oh.. I uncommented the .pm I added | ||
maybe you saw it in botnix.conf | |||
or saw my discussion of it here yesterday | 17:50 | ||
moritz_ | diakopter: nope. But we're discussing a file where can add new repos, and dalek picks it up automatically | ||
diakopter | seems to me the way I did it works ok; it's a tad more boilerplate than adding a single url.. | 17:51 | |
but sending a sighup is faster than "automatically" anyway | |||
moritz_: would you like to take a look at the .pm I added? | 17:53 | ||
18:02
masonkramer joined,
masonkramer left
18:03
stepnem left
18:06
stepnem joined
18:07
jaldhar_ joined
18:09
cotto left
18:11
_jaldhar left
|
|||
diakopter | »ö« 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! | Rakudo Star Released! | 18:18 | |
18:21
Mowah left
18:22
rhebus left,
me joined
|
|||
aloha | me: jnthn asked me to tell you why we have another message bot... | 18:22 | |
me: masak asked me to tell you when you've adapted, aloha | |||
18:23
me is now known as Guest32504,
Guest32504 is now known as us,
us left,
us joined
|
|||
aloha | us: moritz_ asked me to tell you what you find :-) | 18:23 | |
18:23
us is now known as rhebus
|
|||
moritz_ | diakopter++ | 18:23 | |
18:25
DiegoGrez left,
jaldhar_ left,
_jaldhar_ joined
|
|||
diakopter | also irclog.perl6.org works | 18:25 | |
18:26
Axius_ left
18:27
masak joined
|
|||
dalek | kudo: ae66feb | pmichaud++ | src/Perl6/ (2 files): Removed (unused) $lazy parameter from add_signature(). |
18:29 | |
18:29
jferrero joined
18:31
uniejo joined
18:35
uniejo left
18:38
rindolf left,
M_o_C joined,
jaldhar joined
|
|||
masak | huh. I didn't know about \qq either. convenient. | 18:39 | |
18:39
_jaldhar_ left
|
|||
masak | its usage, I mean. not not knowing about it. :) | 18:39 | |
diakopter | heh | 18:40 | |
masak | TimToady++ # '(C<next> without a label is purely dynamic.)' | 18:41 | |
TimToady | just feels like that's what most people will expect, if they use it in a list processor | 18:44 | |
masak | it's much, much saner. as far as I can tell without an actual implementation of it. | 18:45 | |
pmichaud | it follows the direction Rakudo is already going. :-) | ||
(or vice-versa, depending on how you look at it) | |||
18:46
javs joined
|
|||
TimToady | and this'll let you 'last' out of a series too, I expect | 18:46 | |
masak | I guess &first in S32 gets the 'implicit loop' paragraph by virtue of being a slightly modified form of &grep. | ||
TimToady | that's what I figgered | 18:47 | |
masak | the series operator is a loop construct? | ||
TimToady | how else it it going to loop? | ||
pmichaud | it could just be an iterator, no loop | 18:48 | |
(no internal loop) | |||
masak | TimToady: that doesn't really make sense. recursion can be used for looping, yet recursion isn't a loop construct in Perl 6. | ||
so 'how else is it going to loop?' isn't an argument for something being a loop construct. | |||
pmichaud | masak has it closer | ||
masak | this is also a reason I feel it's important to lay these things down in spec. because things can be implemented various ways. | 18:50 | |
and it feels like a dangerous thing to leave up to implementations. | |||
TimToady | well, something has to call the iterator function repeatedly | ||
and it would be nice to be able to stop that on the fly | |||
could replace the {} on the right of ... | |||
masak | I agree. my first thought on "'last' out of a series" was 'ooh!' | 18:51 | |
pmichaud | yes, rakudo's current implementation of series uses 'loop' | ||
masak | case in point. | ||
pmichaud | so, 'last' will likely work. | ||
masak | oh. | ||
not case in point. :) | 18:52 | ||
if you can 'last' out of a series block, it should be guaranteed by the spec that the 'last' binds to the series, and not to something else. | |||
diakopter | TimToady: what is the _reduced member of an std parsetree node | ||
pmichaud | I think that falls out naturally. | ||
diakopter | sorear: or you | 18:53 | |
masak | pmichaud: I don't. trying to imagine a recursive implementation of the series operator. it's going sufficiently well that I'd say it's altogether possible. | 18:54 | |
which means, there's a way to implement infix:<...> such that 'last' doesn't stick on it. | |||
TimToady | diakopter: it's the name of the rule that did the reduction | ||
diakopter | ah, thanks. | 18:55 | |
pmichaud | masak: all of the recursive implementations that I can imagine lead to really long recursion trees, unless one assumes tailcall semantics | ||
masak | I assume tailcall semantics. | ||
pmichaud | s/trees/lists/ | ||
TimToady | masak: it's trivial to put a loop {} around it even if it's really implemented recursively | ||
masak | that'll make 'last' work. | 18:56 | |
what about 'next' and 'redo'? | |||
TimToady | not clear that they're meaningful | ||
diakopter | TimToady: how about ~CAPS | ||
masak | anyway, missing the point a wee bit. | ||
TimToady | next on a series would recompute from the same value | ||
masak | the fact that one has to put a loop {} around it *is what should be mandated by the spec*. | 18:57 | |
TimToady | diakopter: the captures that are supposed to end up in .caps | ||
diakopter | hm | ||
18:57
_jaldhar joined
|
|||
masak | otherwise, implementations might end up diverging on 'last' in series blocks. | 18:57 | |
TimToady | masak: sure, which is why I added the forward-looking modifier, "I expect" | ||
masak | fairy nuff. | ||
I won't complain about not-yet-written spec stuff. happy about what landed today. :) | 18:58 | ||
pmichaud | rakudo: say ~(0, 1, { last if $^a > 100; $^a + $^b; } ... *); # curious | 18:59 | |
p6eval | rakudo ae66fe: OUTPUT«0 1 1 2 3 5 8 13 21 34 55 89 144 233» | ||
pmichaud | :-) | ||
masak | \o/ | ||
19:00
jaldhar left
|
|||
TimToady | I keep wondering if those are backwards, and $^a should always be the last arg, and $^b the next-to-last... | 19:00 | |
moritz_ | why? | 19:01 | |
rhebus | TimToady: that would kill the series version of euclid's algorithm | ||
TimToady | so optional parameters make the front optional instead of the back | ||
pmichaud | I think it's correct as-is. Consider the order of arguments in @^_ | ||
rhebus | { $a, $b, *%* ... 0 }[*-2] <-- euclid | ||
TimToady | nod | 19:02 | |
rhebus | pmichaud++ for showing me that trick | ||
TimToady | it's in risottocode | ||
pmichaud | colomon++ for showing me that trick :) | ||
rhebus | :) | ||
masak | moritz_++ for inventing that trick, I think. | 19:03 | |
in some PerlMonks thread or other. | |||
moritz_ | right | ||
somebody asked for elegant ways to implement GCD | |||
masak | (Perl 6)++ | ||
patrickas | euclid++ for creating a need for this #I think | ||
TimToady | rosettacode.org/wiki/Category:Perl_6 | ||
masak | patrickas: :) | ||
TimToady | er... | 19:04 | |
rosettacode.org/wiki/Greatest_commo...visor#Perl rather | |||
19:06
svetlins joined
19:07
icwiener left,
jaldhar_ joined
|
|||
TimToady | rakudo: say ~ (0,1, { my $r = $^a + $^b; last if $r > 100; $r } ... *) | 19:07 | |
p6eval | rakudo ae66fe: OUTPUT«0 1 1 2 3 5 8 13 21 34 55 89» | ||
TimToady | wish there was a less clunky way to say that. | 19:08 | |
pmichaud | rakudo: say ~ (0,1, *+* ... { $^a < 100 }); # less clunky | ||
p6eval | rakudo ae66fe: OUTPUT«(timeout)» | ||
pmichaud | and apparently nyi | ||
TimToady | and you have it backwards | 19:09 | |
pmichaud | oh, the { } is the stop condition? | ||
TimToady | since the closure indicates the until condition | ||
pmichaud | ah | ||
TimToady | which is an argument for requiring { last if } instead | ||
pmichaud | then | ||
rakudo: say ~ (0,1, *+* ... * > 100 ); | |||
p6eval | rakudo ae66fe: OUTPUT«(timeout)» | 19:10 | |
TimToady | nyi | ||
pmichaud | (still nyi, but pretty concise) | ||
patrickas | > say ~ (0,1, *+* ... { $^a <= 100 }); # less clunky | ||
0 1 1 2 3 5 8 13 21 34 55 89 | |||
just sayin' | |||
pmichaud | less clunky and still backwards :-) | ||
Sec | rakudo: say {123, 456, *%* ... 0 }[*-2]; | ||
p6eval | rakudo ae66fe: ( no output ) | ||
patrickas | but apparently I misunderstood the spec on the end condition | ||
19:10
_jaldhar left
19:11
tylercurtis left
|
|||
patrickas | funny thing I had implemneted it as TimToady is saying then I read the spec and implemented it backwards! | 19:11 | |
1, *+1 ... { $_ < 10 } | |||
produces | |||
1,2,3,4,5,6,7,8,9 | |||
Sec | why doesn't that output anything? | 19:12 | |
patrickas | From the spec | ||
TimToady | spec looks wrongish | ||
M_o_C | How exactly do you call { $a, ... *} constructs? I mean it's not really list comprehensions in the haskell sense, as IMHO those are constructs like [x | x <- [...]]. | ||
TimToady | we do list comprehensions with statement modifiers, at least one dimensionally | 19:13 | |
except I don't think rakudo implements modifier for as a map yet | |||
pmichaud | TimToady: I'm working on that right now. :) | 19:14 | |
TimToady | and the multidim problem is still there, since we don't have multiple formal names, just $_ | ||
M_o_C | And with one dimensionally you mean that you don't (yet) have sth. analogous to [(x,y)|x<-[...],y<-[...]]? | ||
TimToady | not without playing X tricks | 19:15 | |
the basic problem is that standard list comprehension notation is really postdeclarative | |||
and we currently allow postdeclaration only on subs | |||
we might possible allow a loop modifier to bind to an existing variable, I suppose. my $x,$y for <a b c> X <d e f> -> $x, $y; | 19:18 | ||
19:18
_jaldhar_ joined
|
|||
patrickas | TimToady: so should i implement the end condition the other way ? | 19:18 | |
TimToady | I think it would be more consistent to make it the ending condition | ||
not the continue condition | 19:19 | ||
pmichaud | I agree. | ||
patrickas | ok | ||
pmichaud | The 0,1, *+* ... * > 100 example shows that it should be the ending condition | ||
"up to whatever is greater than 100" | |||
TimToady | and if it's that easy, I'm inclined to throw out a lot of the guessing on which way the series is progressing | 19:20 | |
pmichaud | +2 | ||
that would make things soooooo much cleaner, I think. | |||
TimToady | so ... 5 really means ... * !=== 5 | ||
er, wait | |||
patrickas | ? | 19:21 | |
TimToady | that doesn't work on exact match | ||
19:21
jaldhar_ left
|
|||
pmichaud | agreed, there's an exact match issue there. | 19:21 | |
TimToady | obviously I need to feed my brane some nutriments | ||
lunch & | |||
patrickas | :-) | ||
Tene | rakudo: say (123, 456, *%* ... 0)[*-2] | 19:27 | |
p6eval | rakudo ae66fe: OUTPUT«3» | ||
Tene | Sec: I think you mean that ^. you were using {}s instead of ()s. | ||
patrickas | fixed series end condition spectesting | 19:29 | |
Sec | Tene: thanks. I'm stupid :) | 19:31 | |
19:32
x3nU joined
|
|||
Tene | Sec: locally, it does bail out with an error, "Cannot use negative index -1 on Block" | 19:33 | |
masak zzz | |||
19:33
masak left,
Ross left
19:38
jaldhar joined
|
|||
moritz_ fixed the cron script that updates perlcabal.org/syn/ | 19:41 | ||
... mostly | |||
19:42
_jaldhar_ left
19:44
Trashlord left,
Ross joined
|
|||
frettled | If you need any kind of help with that, support, a shoulder to cry on, anything at all, feel free to lean on Tene. | 19:45 | |
:D | |||
moritz_: But seriously, what's the problem? | 19:46 | ||
19:46
Trashlord joined
|
|||
moritz_ | forgot to update some svn.pugscode.org links | 19:46 | |
Tene | Yes, I've cronned a lot of crons. Sometimes I think I've cronned all the crons. | ||
So when you're cronning a cron, and you need cron-support, feel free to cron me. | 19:47 | ||
moritz_ | just a small matter of hacking/debugging | ||
frettled | Tene: But it appears not to be a cronical problem. | ||
TimToady | interestingly, ($^a, $^b, *%* ... * == 0)[*-1] should work, if the matching term is excluded | ||
perhaps the last term is naturally excluded by an implicit 'last if block()'. but if block itself does last($_) if $_ == 0 then it would include the 0 and terminate | 19:52 | ||
pmichaud | that feels like it can work | 19:53 | |
because if you really want to terminate on a specific value, there's already a notation for that :) | |||
TimToady | more generally, perhaps ... 42 turns into ... { last(42) when 42 } or some such | ||
assuming a when is sufficient to trigger -> $_ | 19:54 | ||
not sure this is optimizer friendly though | 19:55 | ||
patrickas | I am not sure I get this :-( | ||
moritz_ neither | |||
frettled | patrickas: you are not alone. | ||
pmichaud | want clarifications? | ||
patrickas | the main thing that is not clear to me | ||
19:55
timbunce joined
|
|||
patrickas | is that | 19:55 | |
TimToady | just trying to express the semantics of ... 42 in terms of the more general form | 19:56 | |
patrickas | when we have a term as the rhs | ||
like 1,10 ... 42 | |||
I cannot see how that can be expressed as { last(42) when 42 } | |||
pmichaud | it would need to be last($_) if $_ after 42 | 19:57 | |
no | |||
hmm | |||
TimToady | we were proposing that a constant be an exact match, and you'd write 1,10 ... * > 42 if you reall meant the other | ||
patrickas | oh ok | ||
pmichaud | it could be something like | 19:58 | |
moritz_ | that would simplify things... except for ...^ | ||
TimToady | with implicit ineqauality, you get problems with the gcd wanting to trim all the terms | ||
pmichaud | { last $_ if $_ === 42; last if $_ after 42 } | 19:59 | |
TimToady | maybe the implicit semantics of ... is last($n) if block() and ...^ is the last if block() | 20:00 | |
so ... * > 42 would return the first number > 42 | |||
20:00
_jaldhar joined
|
|||
pmichaud | ooooh | 20:00 | |
TimToady | to get the other, you'd say either ... * >= 42 or ...^ * > 42 | 20:01 | |
or however that works | |||
pmichaud | or maybe it's just a smartmatch :-) | ||
last($n) when $test and last when $test | |||
TimToady | sure last($n) if $n ~~ $test | ||
last($_) when $test | 20:02 | ||
pmichaud | that might avoid always having to create the block :-) | ||
TimToady | sure, that's how I was already thinking of it from the other way | ||
pmichaud | ah | ||
EPMTOOSLOW | |||
TimToady | though note that if it's a smartmatch it can't do an arity check, only test the final value | 20:03 | |
so only the lhs's closure can do arity | |||
20:04
jaldhar left
|
|||
rhebus | "Your comment submission failed for the following reasons: Text entered was wrong. Try again." :S | 20:04 | |
TimToady | we still want subscripts to autotrim infinite lists, though | 20:06 | |
and we still haven't quite nailed down the scope of the final ... {} matcher such that it trims lefthand literals when you want it to, and doesn't when you don't | 20:08 | ||
patrickas gotta run. If you think the new way is worth pursuing, just phenny me a draft of what should be done and I can implement it so we test / compare with the current way. | |||
20:08
jferrero left
20:09
patrickas left,
alester joined
20:11
ruoso left
|
|||
moritz_ | phenny: tell pmurias if there are any parts of the pugs/mu repo you want extracted into a separate repo, please let me know | 20:12 | |
phenny | moritz_: I'll pass that on when pmurias is around. | ||
TimToady | I wonder if mu/misc should be hoisted into misc? or parts of it? | ||
haven't really looked.. | 20:13 | ||
moritz_ | TimToady: I've tried to extract logic units from it so far. misc/ doesn't appear to one | ||
TimToady | were you planning a grand renaming of historical nicks? | ||
moritz_ | if I did, everybody would have to clone again all the repos | 20:14 | |
I'm of two minds | |||
TimToady | well, if it's well publicized, we can all hold off for a bit | ||
I really have no clue what it buys us | |||
pmichaud | I don't have a problem with re-cloning repos. It's not like it takes long :) | ||
TimToady | also, what about people with old names that don't map? those just stay? | 20:15 | |
moritz_ | we can map them to [email@hidden.address] | ||
well, I have an email address for every former pugs committer | |||
alester | Why is my SSH failing? paste.linuxassist.net/215418 Any clues? | 20:16 | |
TimToady | moritz_: cool | ||
moritz_: however, is that private info leaking? | |||
moritz_ | TimToady: that's the trouble; formerly they were only available to other committers | 20:17 | |
TimToady | some people might not want their internal email addr leaking | ||
20:18
Mowah joined
|
|||
TimToady | unfortunately AUTHORS doesn't hold public email addrs | 20:18 | |
20:18
Guest84816 left,
timbunce left
|
|||
moritz_ | I could mail them all... and wait weeks before a significant portion replied | 20:18 | |
TimToady | alternate strategy would be some mechanism for doing renames in the future, maybe batched so we don't have to sync globally so often | 20:19 | |
part of the once-a-month cycle maybe | |||
moritz_ | I don't want to do any public history rewriting, except maybe in the next 5 days | 20:20 | |
I don't see a sufficient beneift to warrant the hasle and confusion involved | |||
TimToady | maybe one email saying "if you ever want this, register your email with github right now", and then cut it off after 5 days | 20:21 | |
rhebus | how do perl6 modules work? does the rakudo* msi installer come with a module installer? | 20:22 | |
moritz_ | there are some modules pre-installed. There's not yet a working module installer shipped with R* (we hope to change that soon) | 20:23 | |
rhebus | is benchmark preinstalled? | 20:24 | |
20:24
timbunce joined
|
|||
moritz_ | don't think so | 20:24 | |
20:25
DiegoGrez joined
|
|||
moritz_ | 326 active committers | 20:25 | |
rhebus | on github? | 20:26 | |
20:26
tadzik left,
maconga joined
|
|||
moritz_ | no, pugs repo | 20:26 | |
20:26
synth left
|
|||
moritz_ -> sleep | 20:28 | ||
20:29
M_o_C left
|
|||
frettled | alester: Hrm, I don't see where it actually fails. | 20:30 | |
20:30
maconga left
|
|||
alester | it just hangs | 20:31 | |
I wonder if the OS X SSH has some magic that I didn't compile into the new one | |||
frettled | Aha. | 20:32 | |
Firewall. | |||
Or am I misremembering when my brain tells me that there is an application-level firewall in MacOS X? | 20:33 | ||
20:37
javs left
|
|||
alester | I can look | 20:38 | |
20:39
tadzik joined
|
|||
alester | No, because it DOES ask for a password | 20:39 | |
20:47
plobsing2 joined
20:50
plobsing left
20:52
patspam joined
|
|||
rhebus | rakudo: sub ident (Int $x) { $x }; sub list (Range $r) { for $r { say ident $_ } }; list (1..10) | 21:00 | |
p6eval | rakudo ae66fe: OUTPUT«Nominal type check failed for parameter '$x'; expected Int but got Range instead in 'ident' at line 22:/tmp/eJq1oOINFL in <anon> at line 22:/tmp/eJq1oOINFL in 'list' at line 1 in main program body at line 22:/tmp/eJq1oOINFL» | ||
rhebus | what am i doing wrong with that for loop? | ||
TimToady | $ never interpolates in a list without help | ||
jnthn | rhebus: Need to put the range in list context | ||
for @($r) { ... } | 21:01 | ||
or for $r.list | |||
TimToady | or @$r if it were implemented | ||
rhebus | or should I declare (Range @r) instead? would that work? | ||
would it have eager implications? | |||
TimToady | not in interpolation | 21:02 | |
@r = is eager though | |||
but not @r := | |||
and the sig is binding, so @r should work | |||
frettled | alester: Weirdness twice over. Hrm. (Sorry, I'm a bit woozy here.) | ||
frettled declares bedtime, nighty-night. | |||
TimToady | note, though, that (Range @r) is a list of Ranges | 21:03 | |
each element of @r would be expected to be a range | |||
rhebus | aha, so that's a no-go | 21:04 | |
so @($r) or $r.list it is then | |||
TimToady | @r is Range is how that woudld be expressed | ||
rhebus | magical | 21:05 | |
and mysterious | |||
TimToady | or @r where Range woudl probably work | ||
rhebus goes and reads some S[0-9]{2} docs | |||
wolverian | I don't think I've ever written a method that takes specifically a range (in languages that have them) | 21:06 | |
I suppose you might do that to optimize something | 21:07 | ||
21:15
dduncan joined
|
|||
dduncan | moritz_ , I tried emailing you both on the 4th and just now but your email bounces | 21:17 | |
21:18
Mowah left
|
|||
dduncan | I'm requesting a commit bit for perl6 on GitHub ... my existing GitHub account is "muldis" | 21:18 | |
21:18
rainerschuster joined
|
|||
TimToady | done | 21:19 | |
dduncan | moritz_ , sending you an email bounces back with "503-Sender verification failed" | ||
TimToady, if you were referring to me, then should I appear on the right hand column of github.com/perl6 ? | 21:20 | ||
I got an email from GitHub about this though | 21:21 | ||
TimToady | yes, maybe you need to refresh | 21:22 | |
dduncan | I did, twice | 21:23 | |
the list shows 10 organization members | |||
the email I got mentioned 43 approved committers | |||
pmichaud | dduncan: I see you in the list on my screen. The "10 organization members" would be the "publicized" members. | ||
TimToady | are you logged in? | 21:24 | |
pmichaud | I don't know what one does to publicize his/her membership. | ||
dduncan | not logged in yet | ||
pmichaud | aha | ||
you'll need to be logged in, and list yourself as a "publicized member" (I think) | |||
dduncan | okay | ||
pmichaud | (if you want to appear on the public list, that is) | 21:25 | |
at any rate, I can confirm you're on the commit list :) | |||
TimToady | you can also confirm this by doing a push :) | ||
dalek | kudo: dd6a03a | pmichaud++ | src/Perl6/Actions.pm: Refactor whatever_curry to progress towards refactoring out create_code_object() |
21:27 | |
21:28
rbuels left
21:30
sahadev left
21:31
flussence joined
|
|||
flussence | hi guys! | 21:31 | |
tadzik | hello | 21:32 | |
TimToady | std: /<:&foo>/ # interesting that this syntax is available | 21:36 | |
p6eval | std 32123: OUTPUT«===SORRY!===Unrecognized regex assertion at /tmp/VTvArbdQZp line 1:------> /<⏏:&foo>/ # interesting that this syntax  expecting assertionParse failedFAILED 00:01 116m» | ||
TimToady | std: / :&foo / # so is this | ||
p6eval | std 32123: OUTPUT«===SORRY!===Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/b1Z7MG2fSQ line 1:------> / :⏏&foo / # so is thisCan't call method "from" on unblessed reference at /opt/perl-5.12.1/lib/site_perl/5.12.1/STD.pm line | ||
..53… | |||
dduncan | okay, now publicized | 21:37 | |
TimToady | someone else already publicize me :) | ||
*ed | |||
not sure I want to be publicly associated with this project though... ;) | 21:38 | ||
21:39
jaldhar_ joined
|
|||
flussence | Can anyone take a look at this code and see what I'm doing wrong? gist.github.com/567539 | 21:40 | |
It's loosely paraphrased from the CSS 3 spec, works for 1 character input but not for more :( | |||
TimToady | well, rules should generally not start with literals, or they tend not to participate in LTM | 21:41 | |
because of the whitespace before | |||
flussence | oops | ||
21:42
Diego_Grez joined,
DiegoGrez left
21:43
Ross left
|
|||
TimToady wonders if rules should ignore leading whitespace where it is likely to be wrongish, like before literals or ^ | 21:43 | ||
21:43
_jaldhar left
|
|||
TimToady | this seems to be becoming a FAQ | 21:43 | |
lue | ohai o/ | ||
TimToady | go/zaimasu | 21:44 | |
flussence | by leading whitespace, do you mean the actual space after the { or something else there? (still new to the whole p6 regex thing, and feeling a bit lost right now) | 21:45 | |
TimToady | the actual space after the { will match <ws>, which disables longest token matching | ||
so most of those should probably be token instead of rule | 21:46 | ||
lue | TimToady: I agree with the ignore leading whitespace thing [OTOH, if you're going for an easy-to-read regex, you probably shouldn't use 'rule'] | ||
flussence | doh! alright then, I'll give that a try. | ||
21:46
foodoo left
|
|||
TimToady | in particular, having rules that parse \n and such makes no sense | 21:47 | |
flussence | I should go read the differences between rule/regex/tokens again :) | ||
21:47
alester left
|
|||
TimToady | since the <ws> would eat them first | 21:47 | |
flussence | yeah, that's mainly my fault for copy-pasting most of the language verbatim... | 21:48 | |
TimToady | most parsers assume their lexer is managing whitespace; in p6 you do that by using token for lexer-ly stuff | 21:49 | |
flussence | aha | ||
21:53
rhebus left
21:56
_jaldhar_ joined
|
|||
flussence | yay, s/rule/token/ seems to be getting me somewhere | 21:56 | |
21:56
jaldhar_ left
|
|||
dduncan | I don't know if it was discussed before, but I was wondering about issues related to Unicode canonical-equivalence vs compatibility-equivalence in Perl 6 ... | 21:58 | |
21:58
Kodi joined
|
|||
TimToady | we generally only worry about cananonical here | 21:58 | |
I figger compatibility is something you have to be explicit about | 21:59 | ||
Kodi | Can I (GitHub user KodiB) get commit bits for roast, specs, and rakudo? | ||
TimToady | coming | ||
dduncan | also, what about issues concerning different Unicode chars whose glyphs look the same, and telling them apart by a person looking at the source? | 22:00 | |
TimToady | Kodi: done | ||
dduncan | AFAIK, identifiers are allowed to be composed of anything considered a letter in Unicode, right? | ||
in bareword form that is | |||
I assume quoted identifiers can be any string at all | |||
TimToady | dduncan: I think that's a doctor it hurts when I do that issue | ||
dduncan | there might also be security considerations | 22:01 | |
Kodi | TimToady: Excellent! Except it doesn't look like rakudo is included, since it's in a different group. | ||
TimToady | I think someone else will have to do that | ||
sure, but if you're executing user-supplied code you're already in deep kimchee | 22:02 | ||
in general strictness catches typos | |||
certainly data security needs to be handled careful, but not sure that's a core issue | 22:03 | ||
*fully | |||
dduncan | partly I was wondering about this from a language design perspective | 22:04 | |
for example, with regular Str, there can be different abstraction levels involved, eg nationality-specific concepts of when 2 strings are equal vs more general grapheme compares vs codepoint compares | |||
now since identifiers are also character strings, is it reasonable for those to compare at different levels, say if identifiers are written with some characters whose identity changes based on the abstraction level? | 22:05 | ||
22:05
Guest23195 left
|
|||
dduncan | the canon/compat issue is similar but distinct from that concern | 22:06 | |
22:06
Kodi left
|
|||
dduncan | or how would users know at which levels identifiers are comparing | 22:06 | |
TimToady | the defaults are all non-information-losing, just as identifiers are case sensitive by default, so too they're sensitive to differences between "compatible" characters by default | 22:07 | |
22:08
yrgd joined
|
|||
lue | Are 'A' and 'a' the same grapheme? [I can't find a straight answer] | 22:08 | |
dduncan | I believe not | ||
lue | |||
TimToady | if there's a different policy, it should be via pragma | ||
lue: certainly not | |||
dduncan | I thought it prudent for Perl 6 to have some pragma indicating the grapheme abstraction level of the source code it is in, analogous to the "use utf8" or "use encoding" of Perl 5 | 22:09 | |
while we can say all Perl 6 is Unicode, there still remains those issues | |||
lue | I remember some unit where 'A' and 'a' are considered the same. I thought it was 'grapheme'. | 22:10 | |
22:10
timbunce left
|
|||
TimToady | the default is supposed to be grapheme level, where grapheme is, more or less, unique NFC sequence of base plus any marks | 22:10 | |
dduncan | A and a being the same is a higher level abstraction than grapheme | ||
TimToady | NFC implying that if there's a precomposed form, that's its "grapheme number" | 22:11 | |
dduncan | I prefer to go by NFD (or NFKD) in terms of defining the semantics of when 2 things are equal, even if the storage is NFC, since there is more than one NFC for the same NFD sequence sometimes | ||
TimToady | and if not, we graduate to "NFG", where we make up temporary grapheme numbers for convenience. | ||
dduncan | NFC may work for storage, but semantics-wise it has issues | ||
TimToady | doesn't everything? :) | 22:12 | |
dduncan | NFD lacks such issues as far as I know | ||
TimToady | I know the argument for NFD in terms of future compatibility | ||
NFG also doesn't have the issue because it's never stored externally | 22:13 | ||
dduncan | AFAIK, even now, say take a single base letter and 2 accents, and there are 2 different representations in NFC | ||
TimToady | NFD too | ||
dduncan | in respect to having multiple representations of the same grapheme, yes | 22:14 | |
TimToady | in NFG these are considered distinct graphemes, since appearance may depend on order of marking | ||
dduncan | but I see NFD/NFC/NFG as more of an implementation issue ... | 22:16 | |
mainly it is NF*/NFK* etc which is the more user-visible issue | |||
TimToady | indeed, and at that point we require explicit user input | ||
dduncan | same as case-sensitive vs not, accent-sensitive vs not | ||
TimToady | defaults should tend to not lose information | 22:17 | |
dduncan | does the spec deal with that yet, or could you add something about it? | ||
namely, how for a user to specify | |||
TimToady | ./S32-setting-library/Str.pod: our Str multi method nfkc ( Str $string: ) is export { | 22:18 | |
dduncan | mainly I'm concerned about how source code is interpreted, or how identifiers compare | 22:19 | |
22:19
dju left
|
|||
dduncan | how to be explicit about that | 22:19 | |
regular Str data is easy in comparison | 22:20 | ||
TimToady | that would be by pragma, about which I tend to be very conservative, in the hopes that nobody ever really needs it :) | ||
dduncan | it would be good for future-proofing though | 22:21 | |
22:21
tag_ joined
|
|||
dduncan | or so that when people care, there is some documented default for how to interpret older code that didn't declare it explicitly | 22:21 | |
TimToady | it won't be something that is difficult to standardize if the need arises | 22:22 | |
the default will be NFG in some form | 22:23 | ||
22:23
tag_ left
|
|||
TimToady | and for the moment, NFC is a good enough approximation to that for most uses that aren't explicitly trying to push the Unicode envelope. | 22:26 | |
(well, and for languages that require graphemes lacking precomposed forms) | 22:27 | ||
but most Perl 6 programs aren't written in those languages yet | |||
22:30
tadzik left
22:34
cjk101010 left
22:35
rgrau_ joined
22:36
rgrau left
|
|||
gfldex | rakudo: my %h; grammar Foo { rule TOP { <bar>+ }; token bar { (.) { %h{$0} = 1 } } }; Foo.parse('abc'); say %h.perl; | 22:47 | |
p6eval | rakudo ae66fe: OUTPUT«maximum recursion depth exceeded in 'Any::postcircumfix:<{ }>' at line 1 in <anon> at line 1 in 'Any::postcircumfix:<{ }>' at line 1 in <anon> at line 1 in 'Any::postcircumfix:<{ }>' at line 1 in <anon> at line 1 in 'Any::postcircumfix:<{ }>' at line 1 in | ||
..<anon> at … | |||
gfldex | known problem? | ||
22:48
Diego_Grez left
|
|||
gfldex | the problem is %h{$0} | 22:49 | |
$0 should be $0.Str but is $0.Match and | |||
TimToady | a hash by default is supposed to stringify its keys | 22:50 | |
so %h{$0} should act like %h{$0.Str} | |||
or %h{~$0} rather | 22:51 | ||
gfldex | shall I rakudobug? | ||
22:51
dduncan left
|
|||
TimToady | looks like | 22:51 | |
hmm, it's probably trying to see if $0 is a slic | 22:52 | ||
slice | |||
which it can't be, since $ isn't supposed to flatten | |||
gfldex | does a hash require a key to be Str? | ||
TimToady | by default, yes | 22:53 | |
S09:1169 shows how to change that | 22:54 | ||
though that's NYI | |||
gfldex | perlcabal.org/syn/ is still pointing at svn.pugscode.org for the *.pod | 22:58 | |
23:07
rainerschuster left
|
|||
colomon | it's a well-known issue | 23:16 | |
so I presume it's reported already. | 23:17 | ||
23:19
xinming_ joined
23:22
xinming left
23:23
rschuster joined
23:28
rschuster left
|
|||
Sec | .say for ( [1], { [0, @^a Z+ @a, 0] } ... * )[^10] | 23:31 | |
23:36
justatheory joined
23:42
EvanCarroll left
23:55
guidjos joined
23:57
barika joined
23:59
rschuster joined,
rschuster left
|