6.2.10 released! xrl.us/hxnb | geoffb's column (/. ed): xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: feather.perl6.nl:8888/ | www.geeksunite.net Set by Juerd on 20 October 2005. |
|||
Ovid | HI all. | 00:23 | |
Anyone here? | 00:24 | ||
clkao | *yawn* | 00:25 | |
Ovid | I was beginning to feel lonely. | ||
I assume that pugs does not yet automatically support automatic method creation for class variables? | 00:26 | ||
svnbot6 | r7708 | Ovid++ | Stub recipes for object creation and destruction. | 00:29 | |
r7708 | Ovid++ | I was blocked fairly quickly on recipe 13-03 (not committed) because PUGs | |||
r7708 | Ovid++ | apparently does not yet support autogenerating accessors for class instance | |||
r7708 | Ovid++ | variables (or Im doing it wrong somehow) | |||
clkao | commit tests and go to sleep, you shall see them implemented the next day | 00:40 | |
svnbot6 | r7709 | Ovid++ | A couple of array recipes | 00:53 | |
Ovid | Looks like a lot of those tests are already there and they're failing. | 00:59 | |
Night all | |||
eric256__ | anyone remember a while back, autrijus mentioned needing to add stub subs to prelude.pm in some cases? yea thats vague i know. ;) | 02:14 | |
hey the logs have a search button!! never mind found it | 02:17 | ||
02:17
eric256__ is now known as eric256
|
|||
xinming | hmm, what are the differences between `class A { has $.a }; class B { has $a }; ` | 02:32 | |
hmm, or ` $.a =:= $a ` ? | 02:33 | ||
though, don't know if it would be valid to use class A { has $a; } | 02:34 | ||
eric256 | the difference is still in flux | 02:38 | |
but last i read $.a meant "make public accessors for this" while has $a; meant "leave this a private attribute" | |||
ping Juerd | 02:51 | ||
juerd, in case you backlog....building pugs seems to hang on feather...i think. maybe...not realy sure. looks like i might have three concurrent builds at the moment | 02:53 | ||
xinming | eric256: hm, In fact, $:a is a private attribute.... | 02:55 | |
eric256 | or i'm an idiot and forgot my account is used for the auto build. ;) | 02:56 | |
from recent rumblings on the list that might change. | |||
so that $.x is public and just plain $x is private...which makes more sense in my head but who knows what will be the next finaly decision | |||
Khisanth | it seems nothing is ever final :) | 02:57 | |
eric256 | nope. ;) thats part of the fun | ||
Khisanth | makes it unappealing to use though | ||
eric256 | to use? why would you think its ready for use? | 02:58 | |
its not. and if that makes it un appealing then good | |||
autrijus: a while back (while trying to fix shift/pop/min/max to only work on lists) you mentioned using a stub in prelude.pm | 03:04 | ||
i tried that today, but now it hands on 42.shift; any thoughts? | 03:05 | ||
eric256 whistles and hums while waiting for pugs to compile ;) | 03:19 | ||
ingy | cpan-upload -mailto [email@hidden.address] -user INGY -password ******** Perl6-Bible-0.21.tar.gz | 03:29 | |
Finished! | |||
eric256 | cool | ||
ingy | why does `use No::Such::Module` crash the pugs shell? | 04:16 | |
yet syntax errors do not | |||
eric256 | dunno. oddly i just did that a minute ago too ;) | 04:17 | |
ingy wonders how to use yaml in pugs | |||
ingy greps a little and gives up | 04:22 | ||
eric256 | lol. | ||
what error do you get? | |||
ingy | sleep& | ||
eric256 | alright. later | ||
gaal | : FEAR: The new features won't be used by people | 05:12 | |
FEAR: The new features *will* be used by people! | |||
dduncan | FEAR: both of those will happen at the same time ... in different universes ... which one will be ours? | 05:16 | |
spinclad | both of those will happen at the same time... by different people, or to different features | 05:58 | |
'use every feature' is not a recipe for excellent programming | 05:59 | ||
(especially junctions!) | |||
wolverian | junctions might be nice for automatically generating arguments in tests | 06:00 | |
spinclad | .oO ( if junctions are meant to be a step up from Quantum::Superposition, why don't they have complex weights? ) | ||
06:17
brother_ is now known as brother
|
|||
buu | Oh dear god. | 06:39 | |
wolverian | hm? | 06:40 | |
buu | Weighted junctions | ||
wolverian | heh. | 06:41 | |
10:28
r0nny_ is now known as r0nny
|
|||
svnbot6 | r7710 | renormalist++ | - The "documentation will never be rewritten for Perl6" fear | 11:51 | |
brother | What would be the natural score in p6 golf? number of unicode glyphs or number of utf-8 chars? | 13:16 | |
Limbic_Region | I think it still has to be keystrokes | 13:28 | |
so using unicode glyphs may be a penalty rather than a gain | |||
how many keystrokes does it take to generate the zip glyph? | |||
brother | depends on how you keyboard is set up | 13:29 | |
theorbtwo | Depends how you generate it. | ||
For me, three. For a Japanese user, probably 1. | |||
I tend to think the opcount is a better measure for both perl5 and perl6, though it's not as visually obvious. | |||
brother | theorbtwo: No. one of the wonderfull thing in golf is to (ab)use precedence | 13:32 | |
theorbtwo | Then again, I never much cared for golf, and it'd make eval "..." count as the best way to do everything. | 13:36 | |
svnbot6 | r7711 | juerd++ | +=1 | 13:52 | |
theorbtwo wonders what that log entry is supposed to mean. | 13:53 | ||
Juerd | One more. | 14:04 | |
rafl_ | karma points for Juerd, right. ;-) | 14:12 | |
jabbot | rafl_: points for Juerd, right. ;-) has neutral karma | ||
rafl_ | karma jabbot | ||
jabbot | rafl_: jabbot has neutral karma | ||
rafl_ | karma Juerd | ||
jabbot | rafl_: Juerd has neutral karma | ||
theorbtwo | karma juerd | ||
jabbot | theorbtwo: juerd has karma of 1 | ||
rafl_ | Well, maybe not. :-) | ||
karma rafl | 14:13 | ||
jabbot | rafl_: rafl has neutral karma | ||
theorbtwo | Did jabbot's karma counting get reset awful recently? | ||
rafl_ | Hm.. long time no commits.. | ||
theorbtwo | jabbot, uptime? | ||
jabbot | theorbtwo: That is interesting. Please continue. | ||
eric256 | morning | 14:18 | |
theorbtwo | G'morning, eric256. | 14:19 | |
eric256 | is there something super special about prelude.pm? because i have a fix for an issue that works in a seperate file, but when i try to compile it in prelude.pm it doesn't work anymore. | 14:24 | |
autrijus | yeah, see the comments on top of Prelude.pm | ||
eric256 | ahh... now to wait for another compile and see if that works ;) | 14:26 | |
?eval sub x (@array) { shift @array}; x(1); | 14:27 | ||
evalbot_7711 | 1 | ||
eric256 | why does it call x? shouldn't that mismatch the signature? | 14:28 | |
autrijus | it should. that is a bug. | 14:29 | |
theorbtwo | Probably the same bug as... | ||
?eval 1.shift | 14:30 | ||
evalbot_7711 | Error: No compatible subroutine found: "&shift" | ||
theorbtwo | Oh. | ||
eric256 | i fixed that one ;) | ||
theorbtwo | Oh, probably not. | ||
OK then. | |||
eric256 | i was working on the other part.... | ||
?eval my @x = (1..5); print shift @x, " hello"; | |||
evalbot_7711 | Error: No compatible subroutine found: "&shift" | ||
eric256 | i can make that work by adding sub shift (@array) { shift @array }; but that makes 42.shift start working wrong agian ;) | ||
another oddity i found. | 14:31 | ||
?eval shift (1); | |||
evalbot_7711 | Error: No compatible subroutine found: "&shift" | ||
eric256 | ?eval shift (1,); | ||
evalbot_7711 | 1 | ||
eric256 | ?eval shift (1,2); | ||
evalbot_7711 | Error: Can't modify constant item: VUndef | ||
eric256 | middle one shouldn't work either, but it does | ||
autrijus | why not? | 14:35 | |
eric256 | why would (1,) work when (1,2) does not? they should be identical shouldn't they? | 14:36 | |
wolverian | autrijus, they're lists! they can't be shifted! | 14:37 | |
or mutated in any other way | |||
autrijus | ah. right. | 14:38 | |
?eval shift(1,) | |||
evalbot_7711 | Error: No compatible subroutine found: "&shift" | ||
autrijus | ?eval shift (1,) | ||
evalbot_7711 | 1 | ||
autrijus | autoenref | ||
eric256 | huh? what about | ||
?eval shift (1,2) | 14:39 | ||
evalbot_7711 | Error: Can't modify constant item: VUndef | ||
eric256 | ?eval shift (1,2,) | ||
evalbot_7711 | Error: Can't modify constant item: VUndef | ||
autrijus | ?eval 1.shift | ||
evalbot_7711 | Error: No compatible subroutine found: "&shift" | ||
autrijus | so (1,) evaluates to type List | 14:40 | |
autoenref into Array | |||
shifts correctly | |||
wolverian | wow, that is headache | ||
autrijus | it is | ||
not sure if it's worth it | |||
eric256 | but (1,2,) doesn't? | ||
autrijus | eric256: there is a bug on either side. | ||
wolverian | please p6l about it if you have the energy :) | ||
autrijus | yes :) | ||
eric256 | ahh.. i thought you were saying it was right. ;) | ||
is there somewhere easy i can look for the sub (@a) accepting a scalar? | 14:41 | ||
autrijus | nb: a scalar containing an array ref | 14:43 | |
eric256 | what? | 14:44 | |
i want to look in the source for a way to fix sub shift (@array) accepting a scalar. | |||
robkinyon | why? | 14:45 | |
wolverian | eric256, it must accept arrayrefs, which are scalars | ||
eric256 | but it shouldn't accept "hello" or 1 | ||
Juerd | wolverian: That's not entirely true. | ||
wolverian: It can expect an Array, and thus provide Array context | |||
This is a form of scalar context, but you can look at it in two different ways: | |||
1. arrays are auto-reffed | |||
2. arrayrefs are auto-dereffed | |||
wolverian | right | 14:46 | |
Juerd | Which one occurs internally is irrelevant | ||
wolverian | that's what I meant | ||
it has to accept a subcontext of scalar | |||
is that true? | |||
eric256 | either way. sub x (@array); x(1); should be an error right? | ||
Juerd | Yes | ||
1 can't coerce to an array. | |||
wolverian | argh. this container/value context dichotomy makes me cry | ||
(as in, it hurts my head to talk about two kinds of contexts.) | 14:47 | ||
Juerd | wolverian: Yes, that is true, but not all too relevant for this discussion :) | ||
wolverian | true. sorry. :) | ||
Juerd | There aren't two kinds of context. | ||
There are infinite. | |||
eric256 | yea i don't kow anything about containers and values :) i'm happy in my bliss. either way 1 isn't an array or list so i'm fine ;) | ||
Juerd | item and list context each have infinite subcontexts | ||
wolverian | Juerd, I meant two classes of context. erm. that's even worse way of putting it | 14:48 | |
Juerd, item/list versus type | |||
Juerd | eric256: 1 is a list in list context, much the same way anything is a list in list context | ||
something is a list iff it is in list context. | |||
There are no lists that aren't in list context | |||
And there are no non-lists that are in list context | |||
Well, elements of a list :) | 14:49 | ||
wolverian: type contexts are subtypes of item/list | |||
wolverian: Array context is item/Ref/Array | |||
This hierarchy is pretty simple | |||
wolverian | hm. right. | ||
Juerd | There is item, with beneath it: Str, Num, Bool and Ref | 14:50 | |
And everything else is directly under Ref | |||
List has the same substructure | |||
Oh, and there is Scalar, which equals item but changes type. | |||
Or you could see it as directly under item | 14:51 | ||
As there's also Scalar list context | |||
wolverian | how does one specify list context? | ||
*@foo? | |||
Juerd | Yes | ||
wolverian | okay. | 14:52 | |
Juerd | Hence the alias "slurpy" context | ||
wolverian | sorry for being so thick about this. | ||
Khisanth | is that the left or the right? | ||
Juerd | This is in signatures only | ||
Outside signatures, * is splat, which doesn't exactly equal providing list context. | |||
wolverian | hm. I thought assignment was unified somewhat with signatures, at some point | ||
Juerd | Also, I believe the "list" operator is weird, wrong, and I consider it non-existent. | ||
wolverian | my (*$foo) = @bar; | 14:53 | |
Juerd | And, of course, containers provide list context to the RHS of the = | ||
collection containers at least | |||
wolverian: No, that's aliasing | |||
wolverian: The := operator has a signature on its LHS, as the signature in a sub, but without parens. | |||
wolverian | does the * do anything there? | ||
Khisanth | then what are := and ::=? | 14:54 | |
wolverian | Juerd, ah. okay. | ||
Juerd | Khisanth: For binding/aliasing | ||
Khisanth | * on the left side of an assignment retains it's p5 meaning? | ||
Juerd | No, typeglobs go away. | ||
*$foo = @bar is a syntax error, afaik. | |||
Khisanth | sounds pretty darn similar | 14:55 | |
Juerd | * is valid in signatures and sub calls (symmetrically, also the RHS of binding) | ||
robkinyon | eric256: wouldn't it be enough to ask "if ( $scalar does Array )" ? | ||
Juerd | robkinyon: The signature should fix this. | ||
robkinyon: Not an explicit check | |||
PerlJam | Khisanth: * is always either multiplication or "flatten" | ||
eric256 | robkinyon....sure. but the scalar should never be passe din and that sub never called | 14:56 | |
robkinyon | so, there should be a shift( @a Array ) and a shift( $c Array ) ? | 15:00 | |
Juerd | robkinyon: What is this syntax? | ||
There should be a single shift(@a) | |||
svnbot6 | r7712 | juerd++ | more fears; markov++ | ||
eric256 | wouldn't shift (Array @a) be redundant? | ||
Juerd | This handles: shift(@array), shift($arrayref), @array.shift and $arrayref.shift | ||
Possibly it has modifiers like :n(5) to shift 5 at a time, but that's outside the scope of this | 15:01 | ||
wolverian | OT: why does (foo){1,3} only capture once in perl5? | 15:03 | |
rather, does perl6 do that too? :) | |||
robkinyon | oops | ||
i flipped the type and the variable. :_) | |||
eric256 | ?eval sub x ($x) { say $x}; x(1); x (1,2,3,4); x(1,2,3,4); | 15:06 | |
evalbot_7712 | 1 1234 Error: No compatible subroutine found: "&x" | ||
eric256 | ?eval sub x ($x) { say $x}; x(1); | 15:07 | |
evalbot_7712 | 1 bool::true | ||
eric256 | ?eval sub x ($x) { say $x}; x(1,2,3); | ||
evalbot_7712 | Error: No compatible subroutine found: "&x" | ||
eric256 | so it does work the other way around. blah | ||
Juerd | wolverian: Because that's the only way to make sure you know beforehand which capture variables there will be. | ||
wolverian: Count the left parens. Those are the $n numbers. | |||
wolverian | Juerd, right. | 15:08 | |
Juerd | I know no way around this. | ||
wolverian | since $/ is a tree of matches anyway, it can just hold an arrayref | 15:09 | |
kolibrie | wolverian: in Perl 6, all three values will be captured and put in an array ref | ||
wolverian | kolibrie, ah, like I assumed. thanks! | ||
kolibrie | :) | ||
PerlJam | wolverian: All quantifiers will capture into an array. | 15:10 | |
wolverian | yay! | ||
PerlJam | (this week :) | 15:11 | |
wolverian | that is much saner than perl5. | ||
Juerd | It's more useful | 15:12 | |
But imo, equally sane | |||
wolverian | hm. perhaps. | 15:13 | |
PerlJam | Juerd: I don't know ... the perl5 behavior exposes an implementation detail to the user rather than doing something more useful. | ||
I guess that was the sanest thing to do though | |||
wolverian | TMTOWTBS (There's More Than One Way To Be Sane) | 15:14 | |
do rules have methods? | 15:16 | ||
eric256 | to their madness? | ||
eric256 couldn't resist | |||
wolverian | or: are named rules first class citizens outside rules? | 15:17 | |
Grammar.rule($string) or so. | 15:19 | ||
PerlJam | wolverian: perl6 continues to follow the principle of least surprise. | 15:22 | |
wolverian | PerlJam, was that a yes or no? :) | 15:23 | |
PerlJam | yes, but it would be spelt more like $string ~~ Grammar.rule I think | 15:24 | |
eric256 | hmmm. stubing shift doesn't seem to work at all | ||
or my computer just dislikes me greatly ;) | |||
PerlJam | I don't know that it's been specced anywhere how the "subroutine form" of rules work. | 15:25 | |
Perhaps Grammar::rule($string,@args) ? | |||
eric256 | ?eval sub shift (@array) { shift @array }; sub shift ($s) { die }; my @x = (1..5); say shift @x, " hello"; | 15:28 | |
evalbot_7712 | 1 hello bool::true | ||
eric256 | ?eval sub shift (@array) { shift @array }; sub shift ($s) { die }; my @x = (1..5); say shift @x, " hello"; shift 42; | ||
evalbot_7712 | 1 hello Error: Died | ||
theorbtwo | ?eval rule r {42}; \&r | ||
evalbot_7712 | Error: Undeclared variable: "&r" | ||
eric256 | but dropping those two definitions into prelude.pm and marking them as 'is primitive' doesn't change anything at all. | ||
btw in prelude.pm i marked them with * to put them global... even tried adding multi in front, it just doesn't like them | 15:30 | ||
ehh don't 'mind me...if you have pugs open on windows during compile it doesn't replace the existing pugs...good to know | 15:31 | ||
?eval my @x = (1..5); my @y = splice(@x,5) | 15:37 | ||
did i do that? or coincedence? | |||
?eval my @x = (1..5); my @y = splice(@x,5); | |||
evalbot_7713 | Error: No compatible subroutine found: "&splice" | ||
eric256 | ?eval my @x = (1..5); my @y = splice(@x); | 15:38 | |
evalbot_7713 | [1, 2, 3, 4, 5] | ||
svnbot6 | r7713 | iblech++ | * Usual svn props. | 15:39 | |
r7713 | iblech++ | * docs/quickref: | |||
r7713 | iblech++ | * README: Mentioned new "fears". | |||
r7713 | iblech++ | * unicode: Fixed the Unicode variant of ??!!. | |||
r7713 | iblech++ | * fears: Extremely minor cosmetical fix. | |||
r7713 | iblech++ | * data: | |||
r7713 | iblech++ | * (42) is neither a list nor an array, but the Num 42. | |||
r7713 | iblech++ | * (42,) and list 42 are one-element arrays. | |||
r7713 | iblech++ | * ($foo,$bar) does not create new containers, while [$foo,$bar] does | |||
r7713 | iblech++ | (also see t/data_types/lists.t and t/data_types/array_ref.t and several | |||
r7713 | iblech++ | p6l discussions linked in these tests). | |||
r7714 | iblech++ | docs/quickref/data: More explanations WRT the constantness of (...,...) and | 15:40 | ||
r7714 | iblech++ | [...,...]; also see t/operators/binding/arrays.t and related p6l discussions. | |||
r7714 | iblech++ | (BTW, PIL2JS handles most (all?) of these things ((42) is not an array, the | |||
r7714 | iblech++ | comma operator does not create new containers, but [...] does, etc.) correctly. | |||
theorbtwo | ??!! has a unicode variant? | 15:41 | |
eric256 | dunno. i'm confused on his (42,) list 42 notes. ;) | 15:42 | |
Khisanth | list 42 creates an array? boy that sure is a misleading name ... | ||
theorbtwo | Oh, it doesn't -- he added it to the abusive section. | 15:44 | |
Do we want to add Ā¢ to the top section, or is it too early? | |||
PerlJam | theorbtwo: release early, release often. | ||
(IOW, add it!) | |||
eric256 | abusive section? | 15:45 | |
?eval (4,2).ref; | 15:47 | ||
evalbot_7714 | ::Array | ||
eric256 | ?eval list (4,2).ref; | ||
evalbot_7714 | ::Array | ||
eric256 | ?eval (list (4,2)).ref; | ||
evalbot_7714 | ::Array | ||
eric256 agrees with Khisanth....thats weird. ;) | |||
?eval (l4,).ref; | 15:48 | ||
evalbot_7714 | Error: No compatible subroutine found: "&l4" | ||
eric256 | ?eval (4,).ref; | ||
evalbot_7714 | ::Array | ||
theorbtwo | eric256: There's a section at the top, unicode operators, then unicode ops in Set.pm, then things that we could use as unicode operators if we weren't evil. | ||
eric256 | ahh | ||
mrborisguy | so is there also a ::List type? | ||
eric256 | i' | 15:50 | |
Limbic_Region adds his 6 cents to the "Perl 6 fears" thread | |||
theorbtwo | So, I wonderses... | 15:51 | |
svnbot6 | r7715 | eric256++ | 'Fixed' shift and pop so that all tests pass. Sort of a kludge in prelude.pm that i think needs fixed in the MMD at some point. (@a) signature allows scalars to be passed in (even if they arn't refs). | ||
theorbtwo | Where does one find documentation on C-x 8 ... things for emacs? | 15:54 | |
C-x 8 gives me a no-such error on my xemacs... | 15:55 | ||
Jooon | theorbtwo: you could try C-h b for keybindings list and search for C-x 8 in that list | 15:56 | |
but it doesn't seem that helpful to me | 15:57 | ||
eric256 | ?eval shift 42; | 15:58 | |
evalbot_7715 | Error: Cannot 'pop' scalar | ||
eric256 | aint pretty but it works. ;) | ||
eric256 finds that many of the trans tests were actualy broken, not the implementation ;) | 16:01 | ||
svnbot6 | r7716 | iblech++ | docs/quickref/data: More explanations WRT list context and slurpy signatures. | 16:03 | |
r7717 | eric256++ | trans.t - fixed tests. | |||
eric256 | ?eval int Inf; | 16:13 | |
evalbot_7717 | 179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624224137216 | ||
Khisanth | oO | ||
eric256 | ?eval int Inf == Inf; | 16:14 | |
evalbot_7717 | bool::true | ||
xerox | o_O | ||
eric256 | ?eval use Test; is (int Inf, Inf); | ||
evalbot_7717 | pugs: *** No compatible subroutine found: "&use" at Prelude.pm line 61, column 30-59 | ||
eric256 | figures. lol | ||
xerox | ?eval Inf | 16:15 | |
evalbot_7717 | Inf | ||
eric256 | is does an eq tests instead of == | ||
?eval int Inf eq Inf; | |||
evalbot_7717 | bool::false | ||
eric256 | of course that fails | ||
integral | ?eval log(int Inf) / log(2); | 16:18 | |
evalbot_7717 | Inf | ||
integral | ?eval my $a = int Inf; $a | ||
evalbot_7717 | \179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624224137216 | ||
integral | ?eval my $a = int Inf; log($a) / log(2) | ||
evalbot_7717 | Inf | ||
integral | ?eval my $a = int Inf; log(+$a) / log(2) | 16:19 | |
evalbot_7717 | Inf | ||
integral | ?eval log(179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624224137216) / log(2) | ||
evalbot_7717 | Inf | ||
integral | *sigh* | ||
eric256 | what? | ||
integral | I was hoping log wouldn't overflow | 16:20 | |
eric256 | ahh | ||
?eval int Inf == 'Inf' | |||
evalbot_7717 | bool::false | ||
eric256 | ?eval int Inf eq 'Inf' | ||
evalbot_7717 | bool::false | ||
eric256 | thats just a dumb test anyway...i can't see anyway that would be usefull | ||
?eval '' ~ Inf | 16:21 | ||
evalbot_7717 | "Inf" | ||
theorbtwo | ?eval my $a=int Inf; my $b=0; $b++ while ($a/=2); $b; | ||
eric256 | i mean that would make the string "Inf" magicaly....seems ludicrous | ||
evalbot_7717 | (no output) | 16:22 | |
theorbtwo | ?eval my $a=int Inf; my $b=0; $b++ while ($a>>=1); $b; | ||
evalbot_7717 | Error: unexpected ">" expecting word character, "::", term postfix, operator or ")" | ||
theorbtwo | ?eval my $a=int Inf; my $b=0; $b++ while ($a >>= 1); $b; | ||
evalbot_7717 | Error: unexpected ">" expecting operator or ")" | ||
theorbtwo | Did shift-right change? | ||
Khisanth | maybe unimplemented :) | ||
theorbtwo | ?eval my $a=int Inf; my $b=0; $b++ while ($a +>= 1); $b; | 16:24 | |
evalbot_7717 | Error: Can't use readline() or getc() in safemode. | ||
theorbtwo | (Yes, it did change... but WTF?) | ||
?eval $x = 2; $x +>= 1; | |||
evalbot_7717 | Can't exec "./pugs": Permission denied at examples/network/evalbot//evalhelper.p5 line 46. | ||
theorbtwo | WTF? | ||
xerox | What is +>= ? | 16:25 | |
svnbot6 | r7718 | eric256++ | Fixed infinitiy tests to use cmp_ok and == instead of eq. This seemed more logical than the current string comparisons. | ||
theorbtwo | Shift-right in-place. | ||
?eval $x = 2; $x +>= 1; | 16:27 | ||
evalbot_7718 | Error: Undeclared variable: "$x" | ||
theorbtwo | ?eval my $x = 2; $x +>= 1; | ||
evalbot_7718 | Error: Can't use readline() or getc() in safemode. | ||
theorbtwo | Hm. | ||
Borken. | |||
xerox | pugs> $x +>= 1; | 16:28 | |
*** cannot cast from VInt 1 to Handle (VHandle) | |||
at <interactive> line 1, column 1-9 | |||
(r7636) | |||
theorbtwo | If it was fixed in r7636, why am I seeing it now? | 16:29 | |
eric256 | ?eval 1**Inf | 16:44 | |
evalbot_7718 | 1.0 | ||
eric256 | ?eval .9**Inf | 16:46 | |
evalbot_7718 | 0.0 | ||
eric256 | ?eval 1**Inf | ||
evalbot_7718 | 1.0 | ||
eric256 | ?eval 1.1 **Inf | 16:47 | |
evalbot_7718 | Inf | ||
eric256 | ?eval 1.1**Inf | ||
evalbot_7718 | Inf | ||
eric256 | if a test is just plain wrong? wadda do? lol | ||
theorbtwo | Patch the test so that it's right? | ||
eric256 | this test claims 1**Inf is NaN everywhere except OSX where it is 1... but that doesn't seem to be true | 16:48 | |
theorbtwo | More to the point, it doesn't make sense. | ||
eric256 | exactly | ||
so just go ahead and fix it? | |||
theorbtwo | Yep. | ||
eric256 is finding that lots of tests are failing because the tests are just plain wrong. lol | 16:49 | ||
?eval 1**Inf == 1; | |||
evalbot_7718 | bool::true | ||
eric256 | ?eval 1**Inf eq NaN; | 16:50 | |
evalbot_7718 | bool::false | ||
eric256 | ?eval 1**Inf eq 'NaN'; | ||
evalbot_7718 | bool::false | ||
eric256 | ?eval 1**Inf ~ " Test" | ||
evalbot_7718 | "1 Test" | ||
eric256 | hmm. the is test failes. | ||
okay..on my home computer 1**Inf does equal NaN...but thats a bug | 16:53 | ||
gotta be. right? | |||
brother | You saying prel6 woldn't have transfinite ordinals | 16:56 | |
Khisanth | where is a mathematician when you need one? :) | ||
PerlJam | eric256: 1**Inf == 1 | 17:00 | |
eric256 | hmmm according to a math sie 1**Inf is indeterminate. seems dumb though | ||
lol | |||
PerlJam | well the math site iw WRONG! :) | 17:01 | |
s/iw/is/ | |||
brother | my $e = Inf; $e **= $e for (1 .. Inf); say $e | ||
PerlJam | brother: that should say Inf forever | ||
xerox | ?eval 0/0 | ||
evalbot_7718 | Error: Illegal division by zero | ||
brother | It should only say one thing | 17:02 | |
eric256 | mathworld.wolfram.com/Indeterminate.html | ||
xerox | ?eval Inf / Inf | ||
evalbot_7718 | NaN | ||
Limbic_Region | . o O ( what is a legal division by zero? ) | ||
xerox | Limbic_Region: economics :P | ||
eric256 | ?eval 0 * Inf | ||
evalbot_7718 | NaN | ||
eric256 | ?eval 0 / 0 | ||
evalbot_7718 | Error: Illegal division by zero | ||
eric256 | ?eval Inf - Inf | ||
evalbot_7718 | NaN | ||
eric256 | ?eval 0**0; | ||
evalbot_7718 | 1/1 | ||
xerox | ! | 17:03 | |
eric256 | thast suppose to be NaN too. lol | ||
xerox | Yep. | ||
eric256 | ?eval Inf**0 | ||
evalbot_7718 | 1.0 | ||
eric256 | and that too | ||
xerox | err. | ||
eric256 | ?eval 1**Inf; | ||
evalbot_7718 | 1.0 | ||
eric256 wonders where these test should go. ;) | 17:04 | ||
brother | blame it on ghc | 17:05 | |
t/builtin/math/exp.t | |||
or infinity.t | |||
Juerd | PerlJam: Given the time Perl 5 was made in, I do not think "exposing implementation" was a bad thing. It meant performance and learnability, and Perl 5 was already hiding more than most other languages. | 17:06 | |
svnbot6 | r7719 | eric256++ | arth.t Uncommeted two tests that work, and a third that is still debatable. 1**Inf == ?? | ||
Juerd | eric256: If you don't know where to put a test, dunnowhere.t ;) | ||
eric256: "# I don't know where to put these. Please move them to the appropriate spots." | |||
eric256 | juerd works for me ;) | 17:07 | |
Juerd | eric256: If this allows you to continue where otherwise you need to wait, don't worry about delegating some work. | ||
eric256 | just in the base \t directory? | ||
Juerd | eric256: Someone will eventually step up and put them in the right place. Just keep the tests pure enough (or in blocks) so they can be moved easily. | ||
Sure. | |||
Limbic_Region | there is the t/builtins/math directory though | 17:08 | |
as brother pointed out | |||
eric256 | yea i like his place | ||
Juerd | Whose place? :) | ||
Limbic_Region | brother's | 17:09 | |
mrborisguy | ?eval Inf > Inf | ||
evalbot_7719 | bool::false | ||
Juerd | Oh, I had overlooked that | ||
xerox | eric256: 1^Inf is 1 in Mathematica | ||
Limbic_Region | Juerd - I didn't modify fears file as it seemed like you were doing consolidation | 17:10 | |
Juerd | ?eval 1**Inf | ||
evalbot_7719 | 1.0 | ||
Juerd | Limbic_Region: What's consolidation? :) | ||
mrborisguy | xerox: that makes sense. 1^Inf should be 1 | ||
Limbic_Region has a hard time knowing when Juerd is serious or not | |||
Juerd | Limbic_Region: I'm serious | 17:11 | |
I almost always am | |||
svnbot6 | r7720 | iblech++ | t/builtins/math/infinity.t: Made clearer whether numification (==) or | ||
r7720 | iblech++ | stringification (eq) is tested, using (Perl 6)++'s | |||
r7720 | iblech++ | &infix:<operator_references>. (XXX: should &Test::is be changed to test with | |||
r7720 | iblech++ | eqv?) | |||
mrborisguy | ?eval 2*Inf > Inf | ||
evalbot_7719 | bool::false | ||
mrborisguy | ?eval Inf + 1 > Inf | ||
evalbot_7719 | bool::false | ||
PerlJam | Limbic_Region: re your complaint. I don't think that can ever be truly "fixed" as most of the time questions on design have no easy answer. | ||
Limbic_Region | consolidation in this context means taking input from various sources, finding commonalities and boiling it down to essentials | ||
mrborisguy | ?eval (Inf/Inf, Inf-Inf) | ||
evalbot_7719 | (NaN, NaN) | 17:12 | |
Limbic_Region | PerlJam - wasn't asking for it to be fixed. | ||
Juerd | Limbic_Region: I'm doing something like that. If two fears are related but different, I keep them as two, though. | ||
Limbic_Region: The plan is to have answers ready in a few months. | |||
r0nny | i got a problem with classes | ||
Juerd | Limbic_Region: Answers that we are all aware of, so the community can help people overcome their fears by being consistent with eachother. The single-voice principle. | ||
r0nny | i want to do class foo { Str $var; }; | ||
Limbic_Region | but when I can't get a simple answer on will .chars return a count in 1 context and the actual chars in another - what motivation do I have to keep pursuing the answer so that I can write tests for it? | ||
PerlJam | Juerd: The fears and responses would make a good article for perl.com :) | 17:13 | |
Limbic_Region agrees | |||
Juerd | PerlJam: There's already been one like it, but not based on a wide collection like this one. | ||
Limbic_Region | though I still think we need to have someplace kept up to date | ||
dev.perl.org/perl6 says to read the latest summary to get caught up on what is new | |||
that IMO, is BS | |||
Juerd | Limbic_Region: Edit away, by the way. If something is missing, or there is a sillier/more dramatic way to put something without making the sentences long or complex, please do help out. | 17:14 | |
PerlJam | r0nny: you're missing a "has" or a "my" or an "our" or a "state" | ||
Limbic_Region | Juerd - did you have any problems with the 6 I listed? | ||
Juerd | Limbic_Region: I know of no project where something new is created, where documentation is kept up to date during the early stages of development. | ||
PerlJam | r0nny: Without more context, I'm not sure which you wanted. | ||
Juerd | Limbic_Region: I think this is very annoying, BUT natural. | ||
Limbic_Region: If I didn't change them, then I didn't. | 17:15 | ||
Limbic_Region | Juerd - after 5 years, I don't buy that early stages of development line | ||
Juerd - I didn't change the file, I only replied to your email | |||
I will add the 6 to the file now | |||
r0nny | PerlJam: just a simple class wit 2 members | 17:16 | |
Juerd | Limbic_Region: Ah, then I have just added them | ||
r0nny | PerlJam: but it doesnt like the { after class <namr> | ||
PerlJam | r0nny: then you probably want to use "has" | ||
svnbot6 | r7721 | eric256++ | NaN.t added some test i didn't see anywhere else for Infinity and NaN results. | ||
r7722 | juerd++ | more fear | |||
Limbic_Region will resync | |||
Juerd | Limbic_Region: In that case: yes, but the problems I have with them are very minor. | ||
Limbic_Region | ok | ||
Juerd | Limbic_Region: It involves structure of the sentences. I want everything to be within 80 characters, and explanations to not be there. | 17:17 | |
Just the raw fear. | |||
Limbic_Region | getting back to the fear/complaint email for a sec | ||
Juerd | When the fear is explained or justified, it's not as silly looking anymore. | ||
PerlJam | r0nny: class foo { has Str $name; } | ||
Juerd | This may be unfair, but it's politics anyway :P | ||
Limbic_Region | I find the current process uninviting to contribute | ||
Juerd | Which current process? | ||
There are many parallel processes | 17:18 | ||
Limbic_Region | The list | ||
PerlJam | Juerd: the discussions that lead no where on p6l | ||
Limbic_Region | where is there a publicly accessable to-do list | ||
Juerd | Limbic_Region: I haven't been clear, and that is entirely my fault | ||
Limbic_Region | where is there a publicly accessible state of the design documents | ||
Juerd | Limbic_Region: But so far, people do seem to contribute fears... :) | ||
Limbic_Region | where is there a publicly accessisble (and up to date) faq | 17:19 | |
PerlJam | Limbic_Region: sounds like you've got an email to p6l to write ;) | ||
Limbic_Region | Juerd - I sent 2 separate emails for that reasons | ||
the first just listed the fears with a short commentary | |||
Juerd | There are indeed too many things that do exist, but are kept privately | ||
Limbic_Region | the other was a complaint which was resurfaced in me by your thread | ||
Juerd | Which doesn't work with 2005's wiki style development | ||
Limbic_Region | PerlJam - I have already written and sent it | 17:20 | |
it was lost as a tangent in one of those long threads that never ended up resolving anything | |||
Juerd | For example, "that's in my local copy of S\d\d" should not have to pop up so often, or even once. | ||
Local copy? Surely Larry knows how to publish it? | |||
Limbic_Region | I tried to frameout the missing pieces of the design docs so everyone would know what needs to be done but even that didn't go anywhere | 17:21 | |
the reference document I used I was told was outdated | |||
and that the current work existed in the collective minds of @larry | |||
PerlJam | It's been my experience that at least pmichaud and lwall don't really "release early and often". They queue up stuff in their personal workspace and then release when there's something reasonably complete. | 17:22 | |
Limbic_Region | well - then the most amount of customer feedback is going to happen on only that which has been released | 17:23 | |
it is hard to offer insight, ask questions, and implement tests for things we don't know about | 17:24 | ||
the framework is a means for everyone to know what is left to be done | |||
anyway - I have vented | 17:25 | ||
eric256 | how do you tell that something is marked with an "is *" ? | 17:31 | |
ie .. $fh is chomped; ? | |||
Limbic_Region | you mean after the fact? | 17:32 | |
eric256 | yea | ||
Limbic_Region | something like my @traits = $foo.traits; | ||
dunno | |||
eric256 | except thats not implemented yet? right? lol. can't do $x does chomped? | ||
Limbic_Region | good question though | ||
eric256 | bastard langauge | ||
Limbic_Region | well - I think asking on a case by case basis is just as beneficial as getting a list | 17:33 | |
*shrug* - ask the list and see if you get a clear straight forward answer | |||
eric256 | lol | ||
i just wants something that works in pugs. ;) | 17:34 | ||
eric256 is off to investigate in source | |||
brother | ?eval int(Inf) | 17:38 | |
evalbot_7722 | 179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624224137216 | ||
brother | heh | ||
Limbic_Region | ?eval Inf ** ( 1 / Inf ) | 17:39 | |
evalbot_7722 | 1.0 | ||
Limbic_Region | ?eval Inf ** ( 1 / 2 ** 128 ) | 17:40 | |
evalbot_7722 | Inf | ||
eric256 | ?eval my $x is dumb; print $x.attrs; | ||
evalbot_7722 | Error: No compatible subroutine found: "&attrs" | ||
r0nny | re | ||
eric256 | hmm... from my limited view it looks like traits arn't realy stored even...just parsed and passed along.../me goes looking for traits tests | 17:44 | |
Limbic_Region | well - if you do end up asking the list, ask for something all encompassing for traits, attributes, do-hickies, and whatcha-ma-callits | 17:47 | |
eric256 | it appears that traits aren't well defined in tests or in syn's ;) joy | 17:48 | |
eric256 can understand how people quickly loose energy and momentum. ;) | |||
Limbic_Region | it isn't all doom and gloom | 17:49 | |
eric256 | no | 17:50 | |
just hard to keep momentum with so many things poorly defined ;) | |||
i have a hard enough time that i don't need the extra question of...is this even how its suppose to work? ;) | |||
PerlJam | A good strategy is to go with your best guess as if it were fact. | ||
eric256 | maybe i could just work on linking the tests to the documentation. i know there was an effort for that..who was leading that effort? | 17:51 | |
Limbic_Region | my characterization of the situation would be that there isn't much of the design so written in stone that you can implement without fear of having to re-write it | ||
eric256 | maybe web based access to test with cross links to documentation could help issues? | ||
Limbic_Region | a substantial amount is defined but is still ambigous as you peel back the layers | ||
and there is an unknown amount of stuff that isn't defined at all | |||
eric256 | l~r exactly ;) | ||
Limbic_Region | when things don't move at the pace people want the mantra "so volunteer" is echo'd without fail | 17:52 | |
the problem is that there isn't a list of things (that I know of ) that someone can go to | |||
eric256 | true. and i have no fear of my stuff being rewritten, in fact i hope most of my haskell is..i like get it done now, then fix later. ;) | 17:53 | |
Limbic_Region | they have to learn the design over lots of emails cause the information isn't in sync with the documents | ||
eric256 | the list of test..but its hard to tell if the tests are wrong, bad, or truly broken. lol | ||
Limbic_Region | and when someone does try to venture out into unknown territory to help frame stuff in they find that there isn't anyway to move forward | ||
except by following the pace of @larry | 17:54 | ||
robkinyon | autrijus: ping | 17:58 | |
eric256 | if anyone remembers who is cross referencing testing and documentation (Syn) let me know ;) | 17:59 | |
kolibrie | eric256: I think that's in t/README | 18:00 | |
eric256 | thanks. found it | 18:02 | |
r0nny | is there a data type for references/pointrtd | 18:04 | |
Limbic_Region | ?eval my @foo = 1..4; my $ref = \@foo; say ref $ref; | 18:05 | |
evalbot_7722 | Array bool::true | ||
Limbic_Region | ?eval my @foo = 1..4; my $ref = \@foo; ref $ref; | 18:06 | |
evalbot_7722 | ::Array | ||
Limbic_Region | hmmm | ||
?eval my @foo = 1..4; my $ref = \@foo; $ref.isa; | |||
evalbot_7722 | Error: No compatible subroutine found: "&isa" | ||
Limbic_Region | r0nny - why do you ask? | ||
I think I know what you are getting at but I am not positive | 18:07 | ||
in p5, references are of the scalar data type | |||
for most intents and purposes, that doesn't change | |||
Juerd | References have to be scalars | 18:10 | |
Scalars are Perl's one-item datatype | |||
Limbic_Region | Juerd - right but I am not sure that is the question being asked | 18:12 | |
it is hard to tell but it might be intepreted as "is there a way to tell the difference between a reference and a regular scalar value" | |||
ref is 1 way to answer that question | 18:13 | ||
but it is known to be b0rk in a lot of ways | |||
so that's why I was asking the leading question WRT to p6 | |||
but as r0nny didn't respond, I guess it doesn't matter | |||
Juerd | Limbic_Region: I was only explaining, adding to what you said. | 18:20 | |
Limbic_Region | oh - okie dokie | ||
forgive me for being a bit anal today - I am in the fog of a head cold | |||
Juerd | IIRC, ref() in Perl 6 will be quite boolean. | ||
Limbic_Region | well - with real objects I hope it will be possible to tell the difference between a reference to a hash 'HASH' and one blessed into a class called HASH | 18:21 | |
;-) | |||
Juerd | And there is of course $foo.isa(Ref) | ||
Limbic_Region thought he tried that | 18:22 | ||
Juerd | What are "real objects"? | ||
Limbic_Region | Juerd - the smiley at the end was a bit toungue in cheek | ||
Juerd | Still, what are real objects? | ||
Perl 6 objects will still be decorated references... | |||
Limbic_Region | ?eval my @foo = 1..4; my $ref = \@foo; $ref.isa(Ref) | ||
evalbot_7722 | bool::false | ||
Juerd | We're just mostly silent about that, because blessed references appear to scare people off. | 18:23 | |
Limbic_Region | ?eval my @foo = 1..4; my $ref = \@foo; $ref.isa(Array) | ||
evalbot_7722 | bool::true | ||
Limbic_Region | ?eval my @foo = 1..4; my $ref = \@foo; $ref.isa(Asdf) | ||
evalbot_7722 | Error: No compatible subroutine found: "&Asdf" | ||
Limbic_Region | hmmm | ||
Juerd | <cent>Asdf ;) | ||
Limbic_Region | why would $ref.isa(Ref) be false and ref.isa(Array) be true? | 18:24 | |
Juerd | Ref isn't in the object class hierarchy | ||
(IMO, all these hierachies should somehow be made to be one) | 18:25 | ||
Aankhen`` is going out of town in a few hours; be back on the 5th. | |||
Be seeing y'all. | |||
Juerd | Aankhen``: Havefun | ||
Limbic_Region | IMO, "path of least suprise" was violated there ;-) | ||
svnbot6 | r7723 | iblech++ | * Usual svn props. | 18:28 | |
r7723 | iblech++ | * docs/quickref/unicode: Put the ^K digraph sequences back and added some | |||
r7723 | iblech++ | more (unfortunately, some chars are not ^Kable -- you have to resort to ^V u 1234). | |||
r7724 | iblech++ | docs/quickref/: | 18:47 | ||
r7724 | iblech++ | * fears: "perl6 will be far too slow", separate compilation | |||
r7724 | iblech++ | * data: Added section about references -- when do they auto-dereference? When | |||
r7724 | iblech++ | is $ref ~~ Ref true? Do arrayrefs flatten in list context? | |||
r7724 | iblech++ | (Also see t/var/autoderef.t, t/var/autoref.t, | |||
r7724 | iblech++ | t/var/refs_point_to_containers.t, t/var/assigning_refs.t, and related p6l | |||
r7724 | iblech++ | discussions (see the tests for links)). | |||
stevan | Juerd: Perl 6 objects wont be just decorated Refs anymore actually | 18:48 | |
well, they can be | |||
but we have the opaque instance type now | |||
and IIRC we have a Ref type | 18:49 | ||
which is a reference to ... | |||
Limbic_Region: re: "$ref.isa(Ref) be false and ref.isa(Array) be true" | 18:50 | ||
I think that is Pugs being weird,.. and not Perl 6 | |||
Limbic_Region | stevan thanks | ||
stevan | Limbic_Region: also remember that my $array_ref = @array; is how we make refs,.. not \ | 18:51 | |
Limbic_Region | and I didn't answer Juerd's question WRT "real object" because we haven't drawn a black and white line | ||
all we have done is move the gray area around | |||
stevan | Limbic_Region: well what a "real object" is, is not always the same from language to language | ||
Limbic_Region | stevan - was done explicitly that way for the benefit of the p5 to p6 folks | ||
stevan - I was self-referencing | 18:52 | ||
errr - rather I was distinguishing between the shoe-horned in objects of p5 in comparison to the native data type in p6 | |||
Limbic_Region sneezes, gets confused, and shuts up | 18:53 | ||
stevan hands Limbic_Region a tissue | |||
autrijus: ping | 18:54 | ||
Juerd | stevan: Then my information is incorrect. | 18:55 | |
stevan | Juerd: where are you getting it? | ||
Juerd | stevan: \ is still available if you want to explicitly reference. | ||
stevan: memory. | 18:56 | ||
stevan | A12 talks about opaque instance types | ||
Juerd | That some things evaluate to references in scalar context does not mean the "old" way is incorrect. | ||
In fact, I think that in many cases, it may be very good code documentation. | |||
stevan | Juerd: I like ti myself too,.. I just assumed it went away | 18:57 | |
I think Ref will be a boxed type as well,.. although that stuff is all fuzzy (I am attempting to start a discussion to clarify that on p6c, but no takers so far) | 18:59 | ||
robkinyon | Ref will have to be boxed, won't it? | 19:01 | |
stevan | yup | 19:02 | |
but ref will be the unboxed version | |||
robkinyon | what on earth can be unboxed about a ref? | ||
stevan | unboxed stuff is really just for optimization (at least to the best of my understanding0 | ||
robkinyon | so, it's stuck being a long* ? | 19:03 | |
stevan | if the runtime is in C :P | ||
robkinyon | (or whatever sPASM type is a pointer) | ||
stevan | if the runtime is in Parrot :) | ||
it could be a Javascript class called Perl6.Ref too | 19:04 | ||
the unboxed type will just be the internal runtime type exposed to the p6 user-land | |||
no frills | |||
eric256 | where can i check out an uptodate copy of the SAE? "preferrably the repository that the official copies are in" | 19:05 | |
or is there such a thing? | |||
stevan | svn.perl.org somewhere,.. but Perl6::Bible is keep reasonably up to date IIRC | 19:06 | |
eric256 | last update to svn.perl.org was 4 months ago...doesn't seem to promissing | 19:11 | |
stevan | maybe not then... | 19:13 | |
I think perl6::Bible is the best bet | |||
it was recently updated too (i think) | |||
eric256 | kinda need an repository..i think. maybe not. but i was hoping there was one true source.../me now worries a bit. ;) | 19:15 | |
i'll stick with the svn.perl.org one for now. thanks | 19:16 | ||
stevan | eric256: there is a repository, I may be wrong on the location | ||
eric256 | i found other docs pointing to that one too | ||
stevan | no need to worry | ||
stevan wonders if Juerd's "fears" are maybe not a healthy a thing for the process right now | 19:17 | ||
eric256 | lol | 19:18 | |
stevan | not that I dont think that getting these feelings out in the open is cathardic | ||
but sometimes negativity can spread like a virus, and even when that was not the original intention | 19:19 | ||
eric256 | feather.perl6.nl/~eric256/test/t/var/temp.html | 19:20 | |
aint pretty yet. but i think graphic access to tests + linking to synopsis could be nice. ;) maybe i'll work in some searching etc...who knows | |||
stevan | eric256: we had something like this in the early days | 19:21 | |
not sure what happened to it | |||
PerlJam | stevan: the negativity is already there. | ||
stevan | PerlJam: I know | ||
Limbic_Region | eric256 - I can find the exact location of the repository if you want | ||
eric256 | yea it was a script in util...just going to polish it up and keep a working copy up..maybe after a bit i'll get test.pugscode.org pointed to it ;) | ||
stevan | eric256: nice :) | ||
eric256 | L~R that would be nice. | ||
Limbic_Region | pmichaud mentioned it in my post about needing the rest of the unfinished stuff framed | 19:22 | |
eric256 | it would be cool to link passing/failing to it...but i'm not sure how possible that is | ||
PerlJam | I think Juerd's fears document makes a good rallying point for all of the "neagtive energy" surrounding parrot/perl6 and by answering them maybe we can channel the negativity into something positive | ||
Juerd | Thanks. That was exactly my intention | 19:23 | |
Limbic_Region | svn.perl.org/perl6/doc/trunk | ||
stevan | PerlJam: I hope that is how it works | ||
Limbic_Region | if you are interested in the thread - it was "State of the Design Documents" | ||
Juerd | I've written some responses already. My greatest fear is that those aren't well enough. Please proof read and change where your skills are better than mine! | ||
mrborisguy | eric256: are you changing something in the test headers then? | ||
some sort of pod or comment? | |||
Juerd | stevan: They may not be healthy right now. It all depends on how they are used. | 19:24 | |
svnbot6 | r7725 | juerd++ | Some responses and pointers | ||
stevan | Juerd: exactly :) | ||
mrborisguy | eric256: I can maybe help by starting to find and change some of those | ||
Juerd | stevan: But isn't this true for every single commit that is done? | ||
stevan goes to read Juerd's responses | |||
Juerd | There is a lot of Perl 6 FUD that is entirely unnecessary | ||
stevan | FUD? | 19:25 | |
Juerd | I think we need to get rid of most of it BEFORE we even get close to the release date. | ||
stevan: fear, uncertainty and doubt. | |||
stevan | ah | ||
Juerd | stevan: It's a marketing technique. | ||
stevan | I think a release might be the best cure for that | ||
Limbic_Region | Juerd - a lot of the FUD wasn't FUD at one time | ||
Juerd | Limbic_Region: That certainly is true. | ||
Limbic_Region: Still, at this point it is. | 19:26 | ||
Limbic_Region | people say stuff about p6 which at the time is true - it changes, but as there is no single place to get current - it spreads | ||
stevan | Juerd: I think the FUD is pretty deeply ingrained,.. | ||
I think the best FUD clear-er of late has been Pugs | |||
Juerd | Yes, it certainly is | ||
stevan | prior to Pugs most people just assumed it was and would always be vaporware | ||
Juerd | But that's mostly the "it will never be released" FUD | ||
PerlJam | Juerd: I have a fear that I'm not sure quite fits into your document: I won't be able to lookup all these fancy operators in any reference. (books will be poorly indexed and online resources aren't punctuation friendly) | 19:27 | |
stevan | PerlJam: we will need to re-implement the web in p6 then ;) | ||
Limbic_Region | PerlJam - like a wizard type search engine? | ||
Juerd | PerlJam: That's not new for Perl 6 :) | ||
Limbic_Region | how do I interleave 2 arrays? and get the zip operator spit out as a possible answer? | ||
Juerd | PerlJam: The solution is to have a table of operators in the index. | ||
Limbic_Region disagrees with Juerd's solution | 19:28 | ||
Juerd | PerlJam: We need to (NEED TO) create our own online resources | ||
Limbic_Region | how is having a list of possible operators going to help me find the one that does what I want | ||
Juerd | PerlJam: Google will not cut it and has been reluctant to add any punctuation to the list of characters that can be found | ||
Limbic_Region | If I knew what I wanted I wouldn't be asking | ||
Juerd | Limbic_Region: There are several forms of documentation | 19:29 | |
stevan searches for "that sqwigly thing with the dots" and gets 0 results back | |||
Juerd | Limbic_Region: The most important is not "I want this, how do I do it?", but "What the hell does this thing mean?" | ||
Limbic_Region: A cookbook has an entirely different structure, of course. | |||
PerlJam really really really likes the answer to "FEAR: My Perl knowledge will be useless!" | |||
stevan | knowing what a character looks like, and what it is called are 2 different things | ||
Juerd | PerlJam: Good to know :) | 19:30 | |
stevan: Who cares, really | |||
stevan | Juerd: where are the fears? | ||
Juerd | stevan: # has 1001 names, and that has only been a source of fun :) | ||
stevan | ah | ||
Limbic_Region | docs/quickrefs | ||
stevan | true | ||
Juerd | stevan: pugs/docs/quickref/fears | 19:31 | |
stevan | Limbic_Region: thanks | ||
Juerd | Quickref may not be the right place, but for now, it's as good a place as any | ||
It was a somewhat different document at first (never commited) | |||
stevan | Juerd++ # nice responses | 19:34 | |
stevan feels better now | |||
Juerd | Yay :) | ||
Please help add them | |||
And help more people feel better | |||
stevan | oh no,.. I can only scare people with metamodels :) | 19:35 | |
Juerd | hehe | ||
PerlJam | stevan: /me looks at the metamodel ... but ... but ... where are my objects? ;) | 19:38 | |
stevan | PerlJam: :) | 19:40 | |
Juerd | /Who dares to object to the metamodel?/ | ||
PerlJam | Juerd++ | ||
robkinyon | You know what my biggest P6 fear is? | 19:42 | |
It's the lack of definitive leadership | |||
There's no place that says "This is the decision, here's the references, and that's that. Bring it up only if you have a truly compelling reason not answered in those references." | 19:43 | ||
Limbic_Region | robkinyon - I tried to figure out how to say that myself as it is something I have heard repeatedly | ||
robkinyon | I can't bring it up, though | ||
stevan elects robkinyon President of Perl 6 | |||
Limbic_Region | but I see it as a root cause of a lot of other fears | ||
stevan | I will bring that up | 19:44 | |
Juerd | That's brave. | ||
stevan doesn't give shit,.. he is crazy man.. crazy | |||
Limbic_Region wonders why robkinyon can't bring it up? | |||
PerlJam | robkinyon: The Synopses are reference-like. Isn't that good enough? | ||
stevan | Limbic_Region: robkinyon has a wife and kids to support ;P | ||
eric256 | perljam...not if they arn't up to date | ||
robkinyon | PerlJam: No, given that the SAE are out-of-date | ||
stevan | I think it is a reasonable thing to say | ||
Limbic_Region | fwiw - the fears I listed aren't necessarily one's that I have | ||
Juerd | Limbic_Region: That's good :) | 19:45 | |
Limbic_Region | just one's that I have heard in various forums in my pursuit of p6 advocation | ||
stevan | its been what,.. 4+ years,.. a freeze on *something* is probably long overdue | ||
Juerd | Limbic_Region: I started with those I remembered, and then visited IRC to collect more | ||
PerlJam | robkinyon: the A&E aren't meant to be kept up-to-date, just the S. | ||
robkinyon | PerlJam: none are up-to-date | ||
Here's the thing - there needs to be a freeze list | 19:46 | ||
Juerd | PerlJam: That's something that should be made very, very clear and currently isn't at all. | ||
stevan | accoring to $Larry, A12 is for entertainment purposes only | ||
robkinyon | stuff that is going to be in P6, end of story | ||
Limbic_Region | PerlJam - I bet you ask two different heads in @larry and you will get 2 different answers on that | ||
stevan volunteers robkinyon for that job ;) | |||
eric256 | is there a general way to split a path into its directories? or just use split "/|\" ? which looks cool but seems evil | ||
robkinyon wonders if stevan ever wants him to do any $work | |||
Limbic_Region | pmichaud updates the As quite a bit to keep them in sync with the Ss | ||
Juerd | eric256: Cough. | ||
eric256: That looks like PHP | 19:47 | ||
PerlJam | Limbic_Region: I bet I won't. I've only talked much to 4 @larry (lwall, dconway, pmichaud, and chromatic) and all give the same answer | ||
Limbic_Region | even after the decision was made to expand the scope of S | ||
Juerd | eric256: split takes a regex. | ||
robkinyon prefers split "\|/" - it looks cooler | |||
Juerd | eric256: Regexes are in //, not "" | ||
eric256 | it wasn't code..just the idea... working on this test to pod script and it has catdir....but where do i find the reverse of that? | ||
Juerd | Also \" is escaping the " | ||
robkinyon | So, is it /\|\// ? | 19:48 | |
gaal | Juerd: you can give a string to split (in p5); it is interpreted as a regexp. | ||
robkinyon | or /\/|\\/ ? | ||
eric256 | juerd...chill. wasn't code.. but it got the point accross...you guys need to take a deep breath. lol | ||
robkinyon | or /\\|\// ? :-) | ||
Juerd | gaal: Unless it is " ", I know this. | ||
gaal | good. | ||
eric256 | i'm looking at the modules it uses but none seem to even have a catdir function ... | 19:49 | |
File::Spec::Functions does have themm...odd name for the module. seems like it should be getting info about the file. anyway | |||
hmmm....now to use an array to travel down a hashref...never done that before | 19:53 | ||
PerlJam | "travel down"? | ||
eric256 | my $index = { }; my @paths = splitpath( $path ); now i want the path populated into the hash | 19:54 | |
PerlJam | like [{}] \%hash, @paths ? | 19:55 | |
eric256 | yea but in perl5 ;) | ||
PerlJam | in perl5 you write a loop | ||
eric256 | thank you perljam for that wisdom. lol. | ||
the problem is that its building the hash as it goes..so the code i tried didn't work...lemme paste it | 19:56 | ||
pasteling | "eric256" at 66.102.136.66 pasted "blah" (5 lines, 113B) at sial.org/pbot/13896 | ||
eric256 | i'm pretty sure it doesn't work because the hash doesn't exist to start with. gonna be a pain...;( | 19:57 | |
eric256 wonders if the easiest thing might be to build a string and eval it | |||
robkinyon | what about : my $hash; my $str = "\$hash->" . join("", map { "{$_}" } @paths) . " = \$file;"; eval $str; | 19:58 | |
eric256 | yea thats what i'm doing now. seems to be the easiet way to do it. | ||
robkinyon | it's an ad-hoc implementation of like [{}], frankly | ||
like() has to be implemented with eval in P5 | 19:59 | ||
(or a loop, but the loop version sucks rocks and is actually slower than the eval version, which is funny.) | |||
oh, and buggy no matter what you do | |||
eric256 | yea the loop would have too many special cases to create the hashref it it doesn't exist yet etc.. | ||
eric256 is trying the eval version currently and crossing his fingers ;) | 20:00 | ||
Juerd | Lack of autovivification sucks. | ||
I think it's the most important thing keeping me away from Ruby | |||
wolverian | Juerd, you can hack it by giving the constructor your own code block, but I don't know if you can do that for every hash, so that you don't have to recode the block for every hash | 20:07 | |
20:15
Lopo_ is now known as Lopo
|
|||
r0nny | yo | 20:19 | |
is there a way, to tell there is a array consists of references to a special kind of object ? | 20:20 | ||
theorbtwo | my @foos is Array of Foo; | 20:21 | |
r0nny | hmm | 20:22 | |
and if this array consists of references ? | |||
theorbtwo | It consists of Foo objects. | 20:23 | |
stevan | is Array of Ref of Foo? | ||
r0nny | i need it to consit of references to foo objects | 20:24 | |
stevan | why refs? | ||
r0nny | stevan: i have a array of depencyes | ||
stevan | why do you need the added level or indirection? | ||
r0nny | each of them has depencyes within this array | 20:25 | |
so references are usefull for me | |||
stevan | why? | ||
r0nny | since its the only way to point to the depencyes | ||
stevan is still not understanding though | |||
theorbtwo | s/yes/ies/. Neither am I. | 20:26 | |
stevan | objects are not copied by value or anything like that | ||
so the extra level of indirection is not really needed IMO | |||
r0nny | stevan: i have a array of a speical class - and each of the arrays elements needs to maintain a list of the elements of the array wich it depends on | ||
stevan | ok | 20:27 | |
r0nny | tell me a better way if u know | ||
stevan | dont use refs | ||
thats all | |||
r0nny | then how else should i do ? | ||
eric256 thinks there is a general conflict of understanding | 20:28 | ||
r0nny | dont tell me "dont use the only way u know" without telling another way | ||
eric256 | in these cases r0nny it would probably help to show code | ||
theorbtwo | I think you're right, eric256. | ||
r0nny | atm im creating this code ;P | ||
stevan | my @foos = (Foo.new(), Foo.new()); @foo[1].add_dependency(@foo[0]); | ||
theorbtwo | You know an object is a reference, right? | 20:29 | |
stevan | my @foos = (Foo.new(), Foo.new()); @foo[1].add_dependency(\@foo[0]); just adds a level of indirection which is not really needed | ||
r0nny | blessed reference | ||
hmm | |||
stevan | r0nny: in p5 yes | ||
in p6, it is not | 20:30 | ||
r0nny | if objects are referneces there must be some kind of blessing | ||
either the reference tells, or the object data itself | |||
hmm | |||
knowdegde of internals would be usefull | |||
stevan | r0nny: in p6 you dont need to know this, just know it is an object type | 20:31 | |
like in Java, C#, etc. | |||
theorbtwo | ...and more importantly... | 20:32 | |
my $a = new Foo; $b = $a; $a.setBar("x"); $b.bar eq 'x'; | |||
r0nny | hmm | 20:33 | |
so cloning is explicit | |||
stevan | r0nny: no, no cloning involved | ||
theorbtwo | If you want to clone, be explicit about it. | ||
r0nny | theorbtwo: thats what i said | ||
and stevan missunderstood again | |||
stevan | r0nny: sorry I read it wrong too :) | ||
theorbtwo | You could stand to be a little more explicit too. | 20:34 | |
PerlJam | stevan: you could've just said you were in violent agreement ;) | ||
stevan just wants everyone to get along,.. no violence man,.. just peace brother | |||
r0nny | well - as long as my perl programms dont run planes / controll nukes everything will be fine ;P | ||
PerlJam | r0nny: strange ... that's *exactly* what I hope my perl programs will do. | 20:35 | |
stevan | as long as perl does not run planes, or control nukes,... :) | ||
r0nny | PerlJam: maybe if perl6 is complete | 20:36 | |
hmm | |||
i got strange errors | |||
PerlJam | When there's a problem with the air traffic control software and fixing it will decide whether a plane crashes or not, would you rather have to wade through oodles of C or just a few lines of perl? ;) | ||
stevan | PerlJam: if it is a life or death thing, I think fixing software is maybe not the best approach | 20:37 | |
PerlJam | r0nny: I'm still hoping for a nice christmas present this year. | ||
r0nny | hehe | ||
PerlJam | stevan: well, one hopes that software that is life-or-death critical has been vetted properly. | ||
stevan was amazed to learn you can debug LISP in outerspace | |||
r0nny | PerlJam: afaik they use ada for planes | ||
and i dont think its easy to get them away from it | 20:38 | ||
stevan | PerlJam: unless p6 has a predictable GC, its not even an option anyway | ||
r0nny: that is what Boeing uses, not sure about Airbus | |||
r0nny | hmm | ||
PerlJam | stevan: it will be as predictable as it needs to be. (you can trigger GC whenever you need to) | ||
stevan | PerlJam: can you disable it though? | 20:39 | |
that is what Java is not used for hard-realtime stuff | |||
cause you dont want the GC kicking in at a critical moment | |||
r0nny: Ada in airbus too (www.adaic.org/atwork/control.html) | 20:40 | ||
PerlJam | stevan: If someone raises the point in the appropriate forum, I'm sure that our intrepid implementors can see that it will be done. | ||
r0nny | i dont see perl as language for realtime systems | ||
PerlJam | What are "realtime systems"? | ||
stevan | PerlJam: I dont know about you, but I wouldnt pass the FAA review process :P | ||
PerlJam | (Everyone has a different definition of "real time") | ||
r0nny | PerlJam: everything is allways predictable | ||
stevan | PerlJam: and where timing is critical to the operation | ||
PerlJam | In that sense, I use perl in "real time" systems right now. | 20:41 | |
r0nny | perl is only soft realtime | ||
stevan is glad he doesn't live near PerlJam ;) | |||
r0nny | hehe | ||
PerlJam | timing is critical, but there's usually several minutes between events. | ||
stevan | r0nny: that is probably stretching it a bit | ||
r0nny | perl isnt suitable for hard-realtime stuff | ||
stevan: compare it to "realtime" linux ;P | 20:42 | ||
stevan doesnt know realtime linux :) | |||
r0nny | a brunch of hacks to make linux more suitable for realtime apps | 20:43 | |
stevan | ah | ||
r0nny | but there is stuff where it cant keep the timings | ||
stevan | nice | ||
:P | |||
r0nny | so it is no hard-real-time | ||
stevan | hard-realtime is still done in assembler and tightly controlled C AFAIK | 20:44 | |
and Ada | |||
r0nny | hmm | ||
maybe there is a way to make perl6 suitable for kernel-programming | |||
would be cool | |||
theorbtwo | Parrot's design has always been for highly user-tunable GC, including extreme tuning like "don't run". | 20:45 | |
r0nny | it would be nice, to have the gc running in a extra thread | ||
PerlJam | terms like "soft" and "hard" real time are meaningless to me. | ||
integral | hmm, you don't necessarily need to disable the GC, just make it more bounded in runtime, surely? | ||
although things like regions, or apr's pools seem more ideal | 20:46 | ||
PerlJam | Now, if you talked about response time in terms of minutes, seconds, microseconds, whatever | ||
stevan | PerlJam: "hard" realtime is: nuclear reactors, airplanes, etc | ||
r0nny | PerlJam: well - using "soft" stuff in envs where "hard" stuff is needes could create whorst-case situatuins | ||
stevan | "soft" realtime is: phone switching systems | ||
stevan cant think of another example | 20:47 | ||
theorbtwo | hard realtime has specifications that say things like "this function takes 3 ms +/- 2ns". | ||
r0nny | routers | ||
theorbtwo | Soft realtime says "this function takes no more then 5 ms". | ||
(Or at least this is how I understand it, having never done either...) | |||
stevan | PerlJam: usually picoseconds actually | ||
eric256 | feather.perl6.nl/~eric256/t_index/ | ||
stevan | nanoseconds | ||
stuff like that | |||
eric256 | tree of all tests. ;) now to make those link ;) | ||
theorbtwo | What's a couple orders of magnitude between friends? | 20:48 | |
stevan | depending upon the application: life and death,.. or my burrito takes longer to microwave | ||
r0nny | hmm | 20:49 | |
btw - does normal regex syntax work allready ? | |||
theorbtwo | Yes, for at least two definitions of "normal". | ||
r0nny | or do i still need to use the prefix? | 20:50 | |
theorbtwo | (Perl 5 regular expressions, and perl 6 rules, but not grammar... I think.) | ||
r0nny | two definitions of "normal"? | ||
stevan | PerlJam: see this (www.embedded.com/story/OEG20011016S0120) | ||
r0nny | no need for gramar | ||
theorbtwo | Ah. If you didn't mean perl5 regular expressions, they're called "rules" now. | 20:51 | |
r0nny | i just need to scan a string, get some special strings, and replace them with data got from a hash | ||
stevan | PerlJam: to quote the article "A hard real-time system is one in which one or more activities must never miss a deadline or timing constraint, otherwise the system fails. Failure includes damage to the equipment, major loss in revenues, or even injury or death to users of the system." | 20:52 | |
r0nny | baslcally i want to replacy every %foo-bar either with $hash{foo-bar} or $hash{foo}{bar} | ||
PerlJam | stevan: yeah, I read it. | ||
stevan | ok | ||
:) | |||
PerlJam | "hard" and "soft" are still too imprecise for my tastes. | 20:53 | |
theorbtwo | Oh. I'd use a s:perl5(g)/-/}{/. (IIRC.) | ||
r0nny | oh - and every %_foobar by the results of a method call | ||
PerlJam | r0nny: p6 rules are available if you have parrot in your path. | ||
theorbtwo | ?eval $a = '$hash{foo-bar}'; $a ~~ s:perl5(g)/-/}{/; $a; | 20:54 | |
evalbot_7725 | Error: Undeclared variable: "$a" | ||
theorbtwo | ?eval my $a = '$hash{foo-bar}'; $a ~~ s:perl5(g)/-/}{/; $a; | ||
evalbot_7725 | Error: No compatible subroutine found: "&g" | ||
theorbtwo | ?eval my $a = '$hash{foo-bar}'; $a ~~ s:perl5/-/}{/; $a; | ||
evalbot_7725 | \"$hash\{foo}\{bar}" | ||
theorbtwo | Something like that, anyway. | ||
PerlJam | theorbtwo: you mesn s:perl5:g/-/}{/; | ||
r0nny | PerlJam: any texts on them ? | ||
PerlJam: i want to use perl6 as much as possible | 20:55 | ||
no perl5 if i could avoid | |||
PerlJam | r0nny: other than the Apocalypse and Synposis, you'll need to read the docs on parrot/compilers/pge | ||
eric256 | feather.perl6.nl/~eric256/t_index/t...first.html now links to the actual tests ;) | 20:58 | |
too few tests are linked to any documentation. ;) | 21:01 | ||
r0nny | is there a good way for recursive replacement ? (ie the substring just got replaces needs other replacements) | 21:02 | |
Juerd | eric256: If you see a task for yourself, by all means get started ;) | ||
eric256 | i am ;) | 21:03 | |
svnbot6 | r7726 | putter++ | Declare PIL-Run inactive. | ||
r7726 | putter++ | I began an integrated PIL-Run and Perl6-Value/Container rewrite, | |||
r7726 | putter++ | but -Ofun prunes it. | |||
eric256 | getting the visualization there..then i can read through those SAE and make sure there are plenty of links to test demonstarting ...but first many of the links to documentation are broken so that needs fixed too. | 21:04 | |
this is a task i can manage without waiting for consensu on differnt things...mind if i have the build process on feather build the test structure too? not yet but when it gets a bit prettier | |||
Juerd | eric256: No, of course I don't mind. | 21:05 | |
eric256 | r0nny keep scanning the string for replacements (over and over) until there are none todo | ||
Juerd | eric256: Why do you feel you have to ask? | ||
eric256 | juerd..just being polite. ;) since you where here..wouldn't have seeked you out, but i do appreciate the enviroment to do this stuff in so i ask our of courtesy | 21:06 | |
s/our/out/ | |||
Juerd | eric256: The motd should speak for itself :) | ||
It's a productivity platform | 21:07 | ||
eric256 | yea. well then i wont ask anymore!! lol ;) | ||
Juerd | Asking me isn't very effective in getting things done :P | ||
:) | |||
eric256 | i just worry with automated tasks | ||
Juerd | And you should | ||
It should probably be ulimited somehow | |||
eric256 | so i ask...this way you know it exists too if something goes wrong while i'm away..but i wont start it now. | 21:08 | |
Juerd | If something goes wrong, I'll find the responsible person anyway. Or not. | ||
Mostly, if something goes wrong, the box will be unavailable for a while. That is a bigger problem than anyone's guilt. | |||
eric256 | and i thought maybe i'd have it build once a night or something. since tests don't change all that rapidly..depends if we can get other people interested in fixing doc links...dang i wish i could remember who said they were working on that...thought there was someone dedicated to it a while back | ||
Juerd | The motd also says something about this :) | 21:09 | |
You can ask who said that in the mailing lists | |||
eric256 | yea.../me puts nose back to grind stone for now. ;) | 21:10 | |
Juerd | "grind stone"? What does that mean? | ||
eric256 | just a phrase for going back to work | ||
think it originated from cattle pushing the grinding wheel or something like that | |||
Juerd | English is such a wonderful..ly annoying language. | 21:11 | |
eric256 | hehe. your telling me | ||
Juerd | My telling you? | ||
Nice illustration of my point, though. | |||
eric256 makes note not to use any odd phrases aroudn Juerd for fear of needing to explain them. lol | |||
Juerd | :) | 21:12 | |
Dutch doesn't have that many set phrases | 21:13 | ||
eric256 | on reflection that phrase doesn't strictly make sense, but i've never had anyone who speaks english question it. lol. when i was learning spanish they had stuff like that to, or when i listen to spanish on TV i'm like...what? | ||
Juerd | I'm not used to thinking so many levels deep to figure out what something means. | ||
eric256 | that probably makes life easier. | ||
Juerd | We have euphemisms, of course, but that's a separate category. | 21:14 | |
eric256 | my favorite is " i could care less"...which should realy be "i couldn't care less" but the 'not' normaly gets dropped making the phrase mean the exact opposite of how it is intended | ||
r0nny | if %info.exists($cmd) <- if doesnt like the i after the % - what did i wrong ? | 21:18 | |
eric256 | ?eval my %x = (1=>2); say "yea" if exists %info<1>; | ||
evalbot_7726 | Error: Undeclared variable: "%info" | ||
eric256 | ?eval my %x = (1=>2); say "yea" if exists %x<1>; | 21:19 | |
evalbot_7726 | Error: No compatible subroutine found: "&exists" | ||
eric256 | ?eval my %x = (1=>2); say "yea" if %x.exists<1>; | ||
evalbot_7726 | Error: No compatible subroutine found: "&exists" | ||
eric256 | ?eval my %x = (1=>2); %x.perl; | ||
evalbot_7726 | "\{(\"1\" => 2),}" | ||
eric256 | got me. ;) doesn't seem to work at all | ||
r0nny | ? | ||
eric256 | ?eval my %x = (1=>2); say "yea" if %x.exists("1"); | 21:20 | |
evalbot_7726 | yea bool::true | ||
eric256 | nm. works fine. if you use it right. ;) | ||
xerox | What does '%' mean? | ||
eric256 | hash | ||
r0nny it probably doesn't like somewhere else..whats the error? | |||
perlbot nopaste | |||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
r0nny | is there a way to do multi-dimensional access to hashed with a array of keys ? | 21:23 | |
Juerd | Yes. | 21:24 | |
svnbot6 | r7727 | putter++ | Update STATUS of 'other implementations of p6 rules' to 'inactive'. | ||
eric256 | ?eval my %x = (1 => (2=>(3=>"hello"))); %x<1><2><3>; | ||
r0nny | Juerd: how ? | ||
evalbot_7726 | \"hello" | ||
xerox | lisppaste3: url? | ||
lisppaste3 | To use the lisppaste bot, visit paste.lisp.org/new/perl6 and enter your paste. | ||
Juerd | r0nny: [.{}] %hash, @keys | ||
eric256 | ?eval my %x = (1 => (2=>(3=>"hello"))); [{}] %x (1, 2, 3); | 21:25 | |
evalbot_7726 | Error: No compatible subroutine found: "&x" | ||
eric256 | ?eval my %x = (1 => (2=>(3=>"hello"))); [.{}] %x (1, 2, 3); | ||
r0nny | omg cool ;P | ||
evalbot_7726 | Error: cannot cast from VList [VStr "1",VList [VInt 2,VRef <Pair>]] to Pugs.AST.Internals.VCode (VCode) | ||
eric256 | ?eval my %x = (1 => (2=>(3=>"hello"))); [.{}] %x, (1, 2, 3); | ||
evalbot_7726 | \"hello" | ||
eric256 | sweet it even works ;) | ||
dduncan | fyi, if anyone cares, MySQL 5.0 is now final/stable/GA | ||
r0nny | Juerd: does it work with exists, too ? | ||
Juerd | r0nny: Yes and no. | 21:26 | |
r0nny | Juerd: manual ? | ||
or can i do a multi sub for it ? | 21:27 | ||
Juerd | r0nny: All but the -1st autovivify the element left of it, afaik. | ||
Unless this changed. Did it? It'd be very weird. | |||
r0nny | how do i tell a multi sub it works ona hash, and gets a array as argument | 21:28 | |
Juerd | r0nny: multi sub foo (%foo is rw, @array) | ||
eric256 | multi sub what (hash $self: Array @array) {} | ||
or the %...actualy probably has to be % | 21:29 | ||
Juerd | eric256: An invocant in a sub? | ||
eric256 | if you do %hash.x isn't %hash the invocant? | ||
or not? | |||
Juerd | Hm, yes. | ||
eric256 | thats what i thought he meant by on a ;) other wise its just a sub with two args | 21:30 | |
svnbot6 | r7728 | putter++ | Grammars/MatchX.pm deleted - Obsoleted by more recent/correct Match classes in PIL2JS and PIL-Run. | 21:36 | |
r7728 | putter++ | Grammars/rx_grammar0.pl deleted - A never-used copy of rx_grammar.pl. | |||
eric256 wonders if we can have a $x.html method. ;) for pretty printing in html in addition to .perl | 21:40 | ||
r0nny | eric256: just use a lib for syntax-highlighting as soon, as its portet | 21:42 | |
svnbot6 | r7729 | putter++ | INSTALL: Removed "There is currently an undiagnosed bug in eval_yaml().", | ||
r7729 | putter++ | as it's not clear this is true. | |||
r7730 | eric256++ | catalog_test.pl - Updated some, created index.html file, fixed e to be exe. Going to work on having templates, color coded test files, stuff like that. | |||
eric256 | r0nny...embedded .html that tagged each element with a div and a class tag would make highlighting as simple as a css file. ;) assuming you could load and parse a file without executing it and then call .html on the result ;) | 21:44 | |
as its portet could also equal long from now and is going about the issue in a backwards kind of fashion IMH | |||
pasteling | "r0nny" at 84.184.148.187 pasted "recursion in multi sub deepexists broken :/" (56 lines, 1.2K) at sial.org/pbot/13899 | 21:45 | |
stevan | r0nny: it fails because nothing is being returned from $cmd.split() | 21:47 | |
no array at least | |||
r0nny | eric256: its not the task of perl to give html syntax highlighting | ||
stevan: ? | |||
stevan | regarding your paste | ||
eric256 | r0nny...why not? wouldn't it be a handy feature? besides if perl has already parsed it, why parse it agian..i assume this could be an extension that walks the AST or something | 21:48 | |
stevan | r0nny: oh, wait, it failing the recursion | ||
hmm | |||
r0nny | stevan: as long as i dont use stuff like fkk-bar it works | ||
stevan: i allready wrote it fails the recursion | |||
stevan is not reading well today ;) | 21:49 | ||
r0nny | any idea how to repair | ||
stevan | why are you making it a multi? | ||
r0nny | i suck at this | ||
hmm | |||
right - no need of multi | |||
eric256 | and realy you could call it deepexists(%h, @a) just to simplify things | 21:50 | |
stevan | however, if you do multi, then you could just do this: | ||
eric256 | why do you say its failing recursion? what is it doing? if you print @a inside deep exists does that shed any light | ||
stevan | multi sub deepexists (Hash %h) { return 0 } | ||
eric256: when @a is undef the multi-sub will no longer match | |||
eric256 | chat window was sitting over that note in the cood...sorry | 21:51 | |
lol | |||
stevan | :) | ||
r0nny | will it work with a scalar if array has 1 elements | ||
stevan | probably not, although I am not sure | 21:52 | |
eric256 | you want to return 1 when @a is undef not 0 | ||
because they all existed all the way to the last element | |||
and i don't think you want @a to be rw....doesn't appear to be a need | |||
r0nny | i need to use exists if a has the size of 1 | 21:53 | |
eric256 | hmmm so? | 21:54 | |
r0nny | hmm | 21:57 | |
eric256 | lol | ||
r0nny | the multi-extension wont work :/ | ||
stevan: the sub with the array seems to match allways | 21:59 | ||
damn - how to get this working :/ | 22:00 | ||
all i need is a deep exists | 22:01 | ||
pasteling | "eric256" at 66.102.136.66 pasted "deep exists" (12 lines, 300B) at sial.org/pbot/13900 | 22:06 | |
eric256 | not pretty but it will work ;) | ||
r0nny | hmm | 22:07 | |
eric256 | hmmm.....what? | ||
pasteling | "eric256" at 66.102.136.66 pasted "deep exists - better ;)" (12 lines, 287B) at sial.org/pbot/13901 | 22:08 | |
r0nny | sweet | 22:09 | |
Juerd | sub deep_exists (%hash, *@_) { @_ or return 1; %hash.exists{shift} or return 0; return deep_exists(%hash, @_); } | ||
Oh, good point, | |||
+@_ or return 1 | |||
eric256 | yours checks multiple keys of the same level, mine goes deeper with each check | 22:10 | |
Juerd | Eh, I forgot something :) | ||
eric256 | lol | ||
Juerd | sub deep_exists (%hash, *@_) { @_ or return 1; %hash.exists{my $key = shift} or return 0; return deep_exists(%hash{$key}, @_); } | ||
There | |||
eric256 | there you go...mines still prettier though . ;) | ||
Juerd | It's multi line. | 22:11 | |
nice use of slurpy scalar | |||
eric256 | sub dexists (%hash, *$first, *@rest is copy) { %hash.exists($first) or return 0; +@rest or return 1; dexists(%hash.{$first}, @rest);} | 22:12 | |
now neither are pretty. ;) | |||
thanks btw ;) | |||
i like these new function signatures...when they all work it will be even cooler. ;) | 22:13 | ||
r0nny | now it works :) | 22:15 | |
so | 22:19 | ||
finally i can sleep :) | |||
eric256 | lol | ||
i know that feeling | |||
r0nny | *afk* | ||
crenz | Hi all, I have a quesiton on using parrot subroutines in Pugs. | 22:58 | |
leo | crenz: while I can't answer the question, parrot backend is currently still stalled | 23:01 | |
svnbot6 | r7731 | eric256++ | Cleaning up test to documentation cross references. | 23:03 | |
crenz | Basically, I wanted to be able to "read" a imc, pir or pbc file and have the symbols appear in the Pugs namespaces. Is this possible with any other compiler that targets parrot? | 23:05 | |
(In fact, is there somewhere a list of compilers that target parrot?) | 23:06 | ||
Juerd | Perhaps irc.perl.org #parrot is a better place to ask | 23:09 | |
leo | hmm seems more like a bugs/haskell question to me | 23:11 | |
(the former question) | 23:12 | ||
list of compilers: languages/* in the parrot tree | |||
leo wonders why pugs got misspelled like this ;-) | 23:13 | ||
crenz | thanks for the answers so far! | 23:22 | |
So I can safely assume it's not possible to use parrot libraries in Pugs right now. | |||
leo | crenz: the pugs lambdacamels seem to be absent currently | 23:42 | |
crenz | that's okay, I'll go to bed and ask again later :-) Danke! | 23:49 | |
leo | crenz: bitte & gute nacht | ||
23:52
_SamB_ is now known as SamB
|