Re: Regex interpolation

2010-03-29 Thread mark . a . biggar
Use <{...}>. as the string returned is reinterpreted as a regex, if it consists of the single quoted string then it's a literal, but you must include the single quotes in the result returned. E.g., <{ my $x = funct($a, $b, $c); "'$x'";}> Mark Biggar -- m...@biggar.org mark.a.big...@comcast.net

Re: Temporal changes

2009-02-23 Thread mark . a . biggar
Instant Moment Point PointInTime Timestamp Event Jiffy Time Mark Biggar%0D%0Amark%40biggar.org%0D%0Amark.a.biggar%40comcast.net%0D%0Ambiggar%40paypal.com

Re: Temporal revisited

2009-02-20 Thread mark . a . biggar
- Original Message - From: "Dave Rolsky" >That will make it clear >that there's no way to calculate "one month from today" >using the core API. "one month from today" is ill-defined regardless what time system you are using. There are dates from which "one month from today" can be r

Re: What does a Pair numify to?

2008-12-15 Thread mark . a . biggar
-- Original message -- From: Larry Wall > On Thu, Dec 11, 2008 at 02:24:54PM +0100, TSa wrote: > > My idea is to let a pair numify to whatever the value numifies to. > > Same thing with stringification. In general I think that a pair should > > hide its key as far a

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread mark . a . biggar
oops make that last if !someCondition(); -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: [EMAIL PROTECTED] > loop { > doSomething(); > next if someCondition(); > doSomethingElse(); > } > > -- > Mark Bigg

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread mark . a . biggar
loop { doSomething(); next if someCondition(); doSomethingElse(); } -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: "Mark J. Reed" <[EMAIL PROTECTED]> > OK, so let's look at the general problem. The struct

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread mark . a . biggar
The literals for Bit are just 0 and 1. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: "Carl Mäsak" <[EMAIL PROTECTED]> > Darren (>): > > Bit > > Blob > > Set > > Bag > > Mapping > > > > How does one write ano

Re: new article, "A Romp Through Infinity"

2008-08-07 Thread mark . a . biggar
Supporting multiple levels of infinities, transfinite numbers or even Surreal Numbers should be considered in the same category of features as returning multiple answers from complex trig functions. They're an interesting thing to discuss and experiment with but shouldn't distract form getting

Re: Complex planes

2008-07-16 Thread mark . a . biggar
Let's worry about getting principal values, branch cuts and handling signed zeros correct before dealing with the interaction of junctions and multi-valued complex functions. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: Rakudo test miscellanea

2008-06-26 Thread mark . a . biggar
Most financial institutions don't use float, rational or fixed point, they just keep integer pennies. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: Larry Wall <[EMAIL PROTECTED]> > Would any financial instituti

Re: Where is "Manhattan Dispatch" discussion?

2008-05-06 Thread Mark A. Biggar
Carl Mäsak wrote: John (>): I'm still in the dark... I find an positions for "manhattan distance" but no definition of what that is. I did find the alternative pod page earlier. I don't have a whole answer for you, but a part that may help. What is generally meant by "Manhattan distance" is s

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread mark . a . biggar
-- Original message -- From: TSa <[EMAIL PROTECTED]> > HaloO, > > John M. Dlugosz wrote: > >> Maybe we already have this--see "emulates" in S11. > > Works for me. > > For me, too. But note that we should keep does the ultimate > type checker that first checks the

Re: First look: Advanced Polymorphism whitepaper

2008-05-01 Thread mark . a . biggar
-- Original message -- From: "John M. Dlugosz" <[EMAIL PROTECTED]> > Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: > > On Wed, Apr 30, 2008 at 9:58 PM, Brandon S. Allbery KF8NH > > <[EMAIL PROTECTED]> wrote: > > > >> On May 1, 2008, at 0:53 , chromatic wrote

Re: static types, checking, conversions

2008-04-16 Thread mark . a . biggar
You should look at Common Lisp. it's definition of "optional typing" is that if you take a correct program and remove all the type declarations, then it still works correctly, although it may be significantly less efficient. Larry and i have discussed this and that was his goai in Perl. Now P

Re: cross operator and empty list

2008-04-13 Thread Mark A. Biggar
Miller, Hugh wrote: From: Moritz Lenz [mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Technically the Cartesian cross operator doesn't have an identity value. It has. The set which contains only the emty set, or in perl terms ([]); Or am I missing something? Should be a (any) 1 point set fo

Re: cross operator and empty list

2008-04-07 Thread mark . a . biggar
Technically the Cartesian cross operator doesn't have an identity value. There is no set X such that A x X = A. Now any singleton set gives a result that is naturally isomorphic to the original set, I.e, there is a obvious bijection between the two sets, but they are not equal sets. -- Mark

Re: cross operator and empty list

2008-04-04 Thread mark . a . biggar
Cartesain product with the empty set is empty. A x B is the set of all pairs (a,b) where a is in A and b is in B. If either is empty then there are no such pairs and the result is also empty. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message

Re: Query re: duction and precedence.

2008-03-30 Thread Mark A. Biggar
Mark J. Reed wrote: I'm a believer in generalizing where possible, modulo the principles of KISS and YAGNI. The latter essentially means "at least make it general enough that you can extend it later without major retooling if it turns out YNIAA.". It's pretty surprising what can turn out to be u

Re: Integerizing a rat involves truncating its tail

2008-03-28 Thread mark . a . biggar
I think nearest makes more sense. People will be really surprised when /1 turns into 0. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: TSa <[EMAIL PROTECTED]> > HaloO, > > just re-reading S03 I

Re: Floating point comparisons

2007-08-01 Thread mark . a . biggar
if the values you are storing in floats are known to be integers of a size less then the mantissa for he floating type then exact comparisons work just as expected. Storing 10 digit phone numbers as floats is an example of this. There must be some way to access exact comparisons in the languag

Re: Generalizing ?? !!

2007-06-11 Thread mark . a . biggar
Besides ?? !! with out an else part is just &&. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: Damian Conway <[EMAIL PROTECTED]> > Mark J. Reed concluded: > > > So I prefer keeping a single construct, but perhaps

Re: Y not

2007-02-21 Thread Mark A. Biggar
Thomas Wittek wrote: Damian Conway schrieb: If the very much more readable 'zip' and 'minmax' are to be replaced with 'ZZ' and 'MM', then I think that's a serious step backwards in usability. Fully agree here and I think that there are still even more places, where the usability could be impro

Re: named sub-expressions, n-ary functions, things and stuff

2006-11-13 Thread mark . a . biggar
And you may be forced to deal with NaN and Inf values if you are storing raw binary float values as they are built into the bit patterns. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: "Mark J. Reed" <[EMAIL PROT

Re: Edge case: incongruent roles

2006-10-18 Thread mark . a . biggar
-- Original message -- From: "Jonathan Lang" <[EMAIL PROTECTED]> > Mark Biggar wrote: > > Jonathan Lang wrote: > > > They can be: > > > > > > $A > $B if $A.x > $B.x | $A.y > $B.y; > > > $A < $B if $A.x < $B.x | $A.y < $B.y; > > > > That dosn't work. > > Agreed

Re: Edge case: incongruent roles

2006-10-18 Thread mark . a . biggar
-- Original message -- From: "Jonathan Lang" <[EMAIL PROTECTED]> > TSa wrote: > > Jonathan Lang wrote: > > > If at all possible, I would expect Complex to compose Num, thus > > > letting a Complex be used anywhere that a Num is requested. > > > > This will not work.

Re: signature subtyping and role merging

2006-10-11 Thread mark . a . biggar
This is the "dog does bark" vs "tree does bark" problem. You can assume that the two methods "blahh" have naything semantically to do with each other at all. Unless ther is a specif annotation from the programmer creating the Role union that they are the same you must assume that they are diff

Re: special named assertions

2006-09-27 Thread mark . a . biggar
The documentation should distinguish between those that are just pre-defined characters classes (E.G., and ) and those that are special builtins (E.G., and . The former are things that you should be freely allowed to redefine in a derived grammar, while the other second type may want to be t

Re: Implicit current-index variable, scoped inside for-loops

2006-08-29 Thread Mark A. Biggar
Carl Mäsak wrote: Hey do you know what would be cool in perl 6 A special variable for when you do a for (@array) style loop it would always have the index of the array Discussed on #perl6: it's already quite easy in Perl 6 to loop with an explicit index: my @array = ; for @array.kv -> $i, $v

Re: Numerification of Order:: constants

2006-08-17 Thread mark . a . biggar
-- Original message -- From: "Reed, Mark (TBS)" <[EMAIL PROTECTED]> > S03, lines 418-420: "[cmp] always returns C, > C, or C (which numerify to -1, 0, or +1)." > > Shouldn't Order::Increase numerify to +1 and Order::Decrease to -1? In > which case it would be cl

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-07-14 Thread Mark A. Biggar
Darren Duncan wrote: Now, I didn't see them yet anywhere in Synopsis 3, but I strongly recommend having negated versions of all these various types of equality tests. Eg, !== for ===, nev for eqv, etc. They would be used very frequently, I believe (and I have even tried to do so), and of cour

Re: Scans

2006-05-09 Thread Mark A. Biggar
Austin Hastings wrote: Gaal Yahas wrote: On Mon, May 08, 2006 at 04:02:35PM -0700, Larry Wall wrote: : I'm probably not thinking hard enough, so if anyone can come up with an : implementation please give it :) Otherwise, how about we add this to : the language? Maybe that's just what reduc

Re: Scans

2006-05-09 Thread Mark A. Biggar
Markus Laire wrote: ps. Should first element of scan be 0-argument or 1-argument case. i.e. should list([+] 1) return (0, 1) or (1) APL defines it as the later (1). -- [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: Scans

2006-05-09 Thread Mark A. Biggar
Austin Hastings wrote: Gaal Yahas wrote: On Mon, May 08, 2006 at 04:02:35PM -0700, Larry Wall wrote: : I'm probably not thinking hard enough, so if anyone can come up with an : implementation please give it :) Otherwise, how about we add this to : the language? Maybe that's just what reduc

Re: Perl 6 built-in types

2006-04-27 Thread Mark A. Biggar
> How about Bag, a set container? Alternately what we really want is > just a Hash where the type of the value is defined as 1, so it need > not be stored at all. Then most of the syntax for it just falls out > of Hash syntax, unless you like writing $x ∈ $bag instead of $bag{$x}. > Presumably w

Re: comment scope

2006-03-14 Thread mark . a . biggar
Isn't this what POD is for? -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: "Ruud H.G. van Tol" <[EMAIL PROTECTED]> > Perl6 could introduce (lexical, nestable) comment scope. > > Has that been discussed before?

Re: s29 and Complex numbers

2006-02-28 Thread Mark A. Biggar
David Green wrote: On 2/23/06, Jonathan Lang wrote: (Another possibility would be to return a list of every possible result when in list context, with the result that you'd get in scalar context being element zero of the list. This even has its uses wrt sqrt(Num), providing a two-element lis

Re: Smart match table

2006-02-08 Thread mark . a . biggar
-- Original message -- From: Luke Palmer <[EMAIL PROTECTED]> > On 2/7/06, Robin Houston <[EMAIL PROTECTED]> wrote: > > Any undef undefinedmatch if !defined $a > > Any Regex pattern matchmatch if $a =~ /$b/ > >

Re: type sigils redux, and new unary ^ operator

2005-11-23 Thread Mark A. Biggar
Juerd wrote: Rob Kinyon skribis 2005-11-23 11:58 (-0500): I don't use 0..$n-1 very often. I use 0..$#arr most often. Good point. Doesn't ^5 encourage [EMAIL PROTECTED] too much? After all, we should write what we mean, instead of something that happens to evaluate to the same list. We mean

Re: Copyrights in file headers

2005-10-17 Thread Mark A. Biggar
Has any FOSS developer ever been found liable (or even sued)? Not that I have any objections to this plan but it might be worth considering that it's much easier to sue a single entity then it is to file a tort against a few tens or hundreds of contributors. Yes, the guy who wrote an open sou

Re: multiline comments

2005-10-11 Thread Mark A. Biggar
Alfie John wrote: Hi (), This is probably a stupid question, but I can't find anything from google: Does Perl6 support multiline comments? Briefly, No and kind of. Standard Perl 6 comments are just like those in Perl 5. A '#' starts a comment that is terminated by the end of line. But, bo

Re: Look-ahead arguments in for loops

2005-09-30 Thread Mark A. Biggar
Mark A. Biggar wrote: Damian Conway wrote: Rather than addition Yet Another Feature, what's wrong with just using: for @list ¥ @list[1...] -> $curr, $next { ... } ??? Damian Shouldn't that be: for [EMAIL PROTECTED], undef] ¥ @list[1...] -&

Re: Look-ahead arguments in for loops

2005-09-30 Thread Mark A. Biggar
Damian Conway wrote: Rather than addition Yet Another Feature, what's wrong with just using: for @list ¥ @list[1...] -> $curr, $next { ... } ??? Damian Shouldn't that be: for [EMAIL PROTECTED], undef] ¥ @list[1...] -> $curr, $next { ... } As I remember it zip hrows

Re: Stringification, numification, and booleanification of pairs

2005-09-25 Thread Mark A. Biggar
In a private conversation with Larry this afternoon, he said that by default "$foo" and ~$foo and $foo.as(Str) all give the same result (assuming scalar context, etc.). And that "@foo[]" and [EMAIL PROTECTED] and @foo.as(Str) are the same as join(' ', @foo) where join is effectively: sub join

Re: [perl #17490] Magic is useless unless verifiable.

2005-09-22 Thread Mark A. Biggar
Joshua Hoblitt wrote: a) live with it b) change the magic number to be two identical bytes so the byte ordering doesn't matter c) shrink the magic number to be a single byte d) use a magic number that can also be used as the byte order indicator. -- [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: Stringification, numification, and booleanification of pairs

2005-09-21 Thread Mark A. Biggar
Eric wrote: Hey, Since you wouldn't expect an object to stringify or numify why expect pairs to? I'm not sure i see any value in thatm, $pair.perl.say would be the best way to output one anyway. my $pair1 = (a => 2); my $pari2 = (b => 3); say $pair1 + $par2; # Error: illegal stringification of

Re: conditional wrapper blocks

2005-09-20 Thread mark . a . biggar
Some other possible problems: 1: if $condition is an expression with side-effects then your new construct has a different meaning then the original code. 2: if the middle part does something that changes the value of the expression $condition then the new construct again has a different meanin

Re: @array = $scalar

2005-08-31 Thread mark . a . biggar
I think this deserves at least a compile time warning and also a strict pragma to make it an error as it is most likely not what the programmer wanted. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] > Ingo Blechschmidt skribis 2005-08-31 13:22 (+): > > @array = $ar

Re: my $pi is constant = 3;

2005-08-18 Thread mark . a . biggar
-- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]> On Wed, Aug 17, 2005 at 08:47:18AM -0700, Larry Wall wrote: > > : >That could be made to work by defining constant to mean you can assign > > : >to it if it's undefined. But then it gets a little harder to reason > > : >about

Re: Time::Local

2005-08-15 Thread Mark A. Biggar
Nicholas Clark wrote: On Tue, Jul 05, 2005 at 06:47:41PM -0600, zowie wrote: There is also a certain joy that comes from noticing that a tool was designed by pedants: it's great that cal(1) handles the Gregorian reformation correctly (or at least, in one of several arguably correct ways) ev

Re: Set operators in Perl 6 [was Re: $object.meta.isa(?) redux]

2005-08-11 Thread Mark A. Biggar
Mark A. Biggar wrote: Luke Palmer wrote: On 8/10/05, Dave Rolsky <[EMAIL PROTECTED]> wrote: [changing the subject line for the benefit of the summarizer ...] On Wed, 10 Aug 2005, Larry Wall wrote: And now some people will begin to wonder how ugly set values will look. We should als

Re: Set operators in Perl 6 [was Re: $object.meta.isa(?) redux]

2005-08-11 Thread Mark A. Biggar
Luke Palmer wrote: On 8/10/05, Dave Rolsky <[EMAIL PROTECTED]> wrote: [changing the subject line for the benefit of the summarizer ...] On Wed, 10 Aug 2005, Larry Wall wrote: And now some people will begin to wonder how ugly set values will look. We should also tell them that lists (and pos

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Mark A. Biggar
Larry Wall wrote: On Wed, Jul 27, 2005 at 06:28:22PM +0200, "TSa (Thomas Sandlaß)" wrote: : Since we are in type hierachies these days, here's my from ::Any : towards ::All version. That's pretty, but if you don't move Junction upward, you haven't really addressed the question Autrijus is asking

Re: %hash1 >>...<< %hash2

2005-06-14 Thread Mark A. Biggar
Luke Palmer wrote: On 14 Jun 2005 06:07:10 -, David Formosa (aka ? the Platypus) <[EMAIL PROTECTED]> wrote: multi sub infix_circumfix_meta_operator:{'>>','<<'} (Hash %a,Hash %b,Code $op) { my Hash %return; for intersection(keys %a,keys %b) -> $key { %return{$key} = $o

Re: comprehensive list of perl6 rule tokens

2005-05-28 Thread mark . a . biggar
I'm having a hard time coming up eith examples where I need anything otehr than union and difference for character classes. Most of the predefined character classes are disjoint, so intersection is almost useless. So for now let's just stick with + and - and simple sets with not parens, unless

Re: comprehensive list of perl6 rule tokens

2005-05-25 Thread Mark A. Biggar
Jeff 'japhy' Pinyan wrote: On May 25, Mark A. Biggar said: Jonathan Scott Duff wrote: On Tue, May 24, 2005 at 11:24:50PM -0400, Jeff 'japhy' Pinyan wrote: I wish was allowed. I don't see why has to be confined to zero-width assertions. I don't either act

Re: comprehensive list of perl6 rule tokens

2005-05-25 Thread Mark A. Biggar
Jonathan Scott Duff wrote: On Tue, May 24, 2005 at 11:24:50PM -0400, Jeff 'japhy' Pinyan wrote: I wish was allowed. I don't see why has to be confined to zero-width assertions. I don't either actually. One thing that occurred to me while responding to your original email was that might h

Re: Perl development server

2005-05-24 Thread Mark A. Biggar
wolverian wrote: On Tue, May 24, 2005 at 03:44:43PM +0200, Juerd wrote: But I like the newly suggested "feather" better, as it can relate to pugs AND parrot. Feather is best one thus far, I think. I like carrot too; it's more playful. I equate Pugs with fun a lot. How about "budgie". a sm

Re: reduce metaoperator on an empty list

2005-05-23 Thread mark . a . biggar
There are actuall two usefull definition for %. The first which Ada calls 'mod' always returns a value 0<=X HaloO Mark, > > please don't regard the following as obtrusive. > > you wrote: > > If as usual the definition of a right identity value e is that a op e = a > > for > all a, > > then o

Re: reduce metaoperator on an empty list

2005-05-20 Thread mark . a . biggar
> Mark A. Biggar wrote: > > Well the identity of % is +inf (also right side only). > > I read $n % any( $n..Inf ) == $n. The point is there's no > unique right identity and thus (Num,%) disqualifies for a > Monoid. BTW, the above is a nice example where a junction >

Re: reduce metaoperator on an empty list

2005-05-20 Thread Mark A. Biggar
John Macdonald wrote: Is there a built-in operator that doesn't have a meaningful identity value? I first thought of exponentiation, but it has an identity value of 1 - you just have to realize that since it is a right associative operator, the identity has to be applied from the right. Well the i

Re: reduce metaoperator on an empty list

2005-05-18 Thread Mark A. Biggar
Stuart Cook wrote: To summarise what I think everyone is saying, []-reducing an empty list yields either: 1) undef (which may or may not contain an exception), or 2) some unit/identity value that is a trait of the operator, depending on whether or not people think (2) is actually a good idea. The u

Re: reduce metaoperator on an empty list

2005-05-18 Thread Mark A. Biggar
Matt Fowles wrote: All~ What does the reduce metaoperator do with an empty list? my @a; [+] @a; # 0? exception? [*] @a; # 1? exception? [<] @a; # false? [||] @a; # false? [&&] @a; # true? Also if it magically supplies some correct like the above, how does it know what that value is? The usual defin

Re: trait and properties thru getter/setters

2005-05-14 Thread mark . a . biggar
I don't understand why you think you need the eval here? -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] > There is syntax to define trait and properties > but is there an API? > > my $b = eval '$a but true'; # setting a true property > # API to do it without an eval? >

Re: split /(..)*/, 1234567890

2005-05-13 Thread mark . a . biggar
No, it's not inconsistant. Think about the simpler case split /a/,'a' which return a list of empty strings. Now ask to keep the separators split /(a), 'a' which will return ('', 'a', '', 'a', '', 'a', '', 'a, '', 'a'). Now look at split /(a)/, 'aaab' which returns ('', 'a', '', 'a', '

Re: rules trouble

2005-05-11 Thread Mark A. Biggar
Dino Morelli wrote: I'm working on more p6rules unit tests. Having some trouble. First, understanding when :w means \s* and when it means \s+ Also, these tests are failing when I use :: to separate the modifier from the pattern. But they work when I do ':w blah' (separate with a space). I'm not sur

Re: Nested captures

2005-05-11 Thread mark . a . biggar
> On Wed, May 11, 2005 at 05:48:59PM +1000, Damian Conway wrote: > : But that's only the opinion of one(@Larry), not of $Larry. > > Let's go 0-based and make $0 =:= $/[0] so that $/[] is all the parens. > Our old $0 (P5's $&) could be $<> instead, short for $ or some > such. Why can't bare $/ jus

Re: Nested captures

2005-05-09 Thread mark . a . biggar
Can I say $*1, $*2, etc, to get perl5 flattened peren counting captures? We need something like that to make perl5->perl6 translation easier; otherwise we'd have to parse perl5 RE instead of just slapping on a ":p5". Unless ":p5" also means that you get a single already fattened match objct.

Re: available operator characters

2005-05-06 Thread Mark A. Biggar
Juerd wrote: Juerd skribis 2005-05-06 18:24 (+0200): |AVAILABLE any() We can use this for labels: |foo| for ... { while ... { ...; next foo if ...; } } It'll confuse the heck out of Ruby coders, but I do like this syntax. It makes

Re: Pugs 6.2.0 released.

2005-05-06 Thread mark . a . biggar
n it it were to be added. All we really have to go on right now is the carry over of the meaning from perl5 of "p1 xor p2 xor p3" which happens to be the same as "p1 xor (p2 xor p3))", I.e., built from a binary right-associative "xor" op. -- Mark Biggar [EMAI

Re: Pugs 6.2.0 released.

2005-05-04 Thread Mark A. Biggar
[EMAIL PROTECTED] wrote: I see here another case of a common erroneous approach to problem-solving. People are trying to enumerate definitions to impose on something, rather than starting with the thing at hand and exhausting any clues it may provide before moving on. This can lead to serious an

Re: -X's auto-(un)quoting?

2005-04-23 Thread Mark A. Biggar
Matt wrote: On Sat, 23 Apr 2005 07:25:10 -0400, Juerd <[EMAIL PROTECTED]> wrote: Matt skribis 2005-04-22 21:55 (-0400): What about . for each level up you want to go? instead of 1.say, 2.say, 3.say you use .say, ..say, ...say (Ok, I'm just kidding.. really!) I read your message after I suggested t

Re: -X's auto-(un)quoting?

2005-04-22 Thread Mark A. Biggar
Larry Wall wrote: I should point out that we're still contemplating breaking .foo() so it no longer means $_.foo(). I wish there were more keys on my keyboard... I know it's a bit counter-cultural, but at the moment I'm wondering if we can make this work instead: given open 'mailto:[EMAIL PROT

Re: CGI.pm url_encoding problem

2005-04-18 Thread Mark A. Biggar
BÁRTHÁZI András wrote: Randal, BÁRTHÁZI> use CGI; BÁRTHÁZI> set_url_encoding('utf-8'); BÁRTHÁZI> The problem is that "use CGI" automagically initializes the parameters BÁRTHÁZI> *before* I set the encoding of them, so set_url_encoding will run too BÁRTHÁZI> late. Did I miss the memo where anythi

Re: [pugs] regexp "bug"?

2005-04-15 Thread mark . a . biggar
EMAIL PROTECTED] [EMAIL PROTECTED] > On Fri, Apr 15, 2005 at 12:56:14AM -0700, Mark A. Biggar wrote: > : Yes, the value 0x can be stored as either 3 byte UTF-8 string or a 2 > : byte UCS-2 value, but the Unicode standard specifically says that the > : values 0x, 0xFFFE a

Re: [pugs] regexp "bug"?

2005-04-15 Thread Mark A. Biggar
BÁRTHÁZI András wrote: Hi, >> This code: >> >> my $a='A'; >> $a ~~ s:perl5:g/A/{chr(65535)}/; >> say $a.bytes; >> >> Outputs "0". Why? > > > \u is not a legal unicode codepoint. chr(65535) should raise an exception of some type. So the above code does seem show a possible bug. But

Re: [pugs] regexp "bug"?

2005-04-15 Thread Mark A. Biggar
BÁRTHÁZI András wrote: Hi, This code: my $a='A'; $a ~~ s:perl5:g/A/{chr(65535)}/; say $a.bytes; Outputs "0". Why? Bye, Andras \u is not a legal unicode codepoint. chr(65535) should raise an exception of some type. So the above code does seem show a possible bug. But as that chr(65535) is

Re: pugs CGI.pm

2005-04-13 Thread mark . a . biggar
No the bug is using chr() to convert the byte as it appears to be defined as taking a Unicode codepoint and returning a UTF-8 character (which will be multibyte if the arg is >127), not as taking an int and return an 8 bit char with the same value. If this were perl 5, I'd say you really wanted

Re: pugs CGI.pm

2005-04-13 Thread mark . a . biggar
The standard for URLs uses a double encoding: A URL is coded in UTF-8 and then all bytes with high bits set are written in the %xx format. Therefore, if you just convert each %xx to the proper byte, the result is a valid UTF-8 string. You don't need to worry about multi-byte codes, if UTF-8 is

Re: The S29 Functions Project

2005-03-13 Thread Mark A. Biggar
Rod Adams wrote: Ashley Winters wrote: For documentary purposes, can we make that $radians? multi sub cos (Num +$degrees) returns Num { return cos :radians($degrees * PI / 180); } my Num $x = cos :degrees(270); I have changed the trig functions it to have an optional "base" argument. (I'm opti

Re: pull & put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread mark . a . biggar
stuff & grab :-) -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- > On Mon, Dec 06, 2004 at 10:45:22AM -0500, Austin Hastings wrote: > : But I'd be willing to rename them to get/put. > > If I went with "get", the opposite

Re: Ordinals, Hashes, and Arrays, oh my

2004-09-26 Thread Mark A. Biggar
Jonadab the Unsightly One wrote: Jonathan Lang <[EMAIL PROTECTED]> writes: ISAM? From the RDBMS world, a kind of index I think, or something along those lines. MySQL for example has a type of table called MyISAM. Index Sequential Access Method Invented by IBM in the '60s, provides fast random ac

Re: Namespaces

2004-09-13 Thread Mark A. Biggar
Luke Palmer wrote: Jeff Clites writes: On Sep 7, 2004, at 6:26 AM, Dan Sugalski wrote: *) Namespaces are hierarchical So we can have ["foo"; "bar"; "baz"] for a namespace. Woo hoo and all that. It'd map to the equivalent perl namespace of foo::bar::baz. How does this hierarchical nature manifest?

Re: Compile op with return values

2004-08-23 Thread Mark A. Biggar
Dan Sugalski wrote: At 11:03 PM -0700 8/21/04, Steve Fink wrote: I am experimenting with registering my own compiler for the "regex" language, but the usage is confusing. It seems that the intention is that compilers will return a code object that gets invoked, at which time it runs until it hits a

Re: Progressively Overhauling Documentation

2004-08-23 Thread mark . a . biggar
>OK, there's one non-incremental idea: documentation that you can write >in one place and display in some completely different order. (Shades of >literate programming!) And although there are good reasons for keeping >the docs in the same file as the code, there are equal but opposite >reason

Re: undo()?

2004-06-29 Thread mark . a . biggar
Sorry I did mean temp. -- Mark Biggar [EMAIL PROTECTED] -- Original message -- > Mark A. Biggar skribis 2004-06-29 9:07 (-0700): > > Besides we already have MTOWTDI with local() and hypotheticals. > > I thought temp replaced local. If not, how do t

Re: undo()?

2004-06-29 Thread Mark A. Biggar
Rafael Garcia-Suarez wrote: Michele Dondi wrote: I must say I've still not read all apocalypses, and OTOH I suspect that this could be done more or less easily with a custom function (provided that variables will have a method to keep track of their history, or, more reasonably, will be *allowed* t

Re: Strings internals

2004-06-16 Thread mark . a . biggar
Yeah, but I believe that at least Unicode has one of the four that they suggest be used for non-locale specific comparisons (canonical decomposition form). So pick that one for the core and provide the others (if necessary) as library functions. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED

Re: Strings internals

2004-06-16 Thread mark . a . biggar
Do we want a Normalization function here as well. If you have that you can use a binary compare (at least for eq/ne). -- Mark Biggar [EMAIL PROTECTED] > The charset vtable needs to handle get/set grapheme, get/set > substring, up/down/titlecase, and (possibly) comparison. Charsets > also ha

Re: Yadda yadda yadda some more

2004-05-14 Thread mark . a . biggar
> Austin Hastings wrote: > >my int $i = ...; # Fails at compile time -- no good conversion. > > > >my Int $i = ...; # Warns at compile time, fails at runtime. > > I don't get the reasoning here. If Yada Yada Yada is to indicate code > that you haven't written yet, it should never fail a

Re: Event design sketch

2004-05-12 Thread mark . a . biggar
You wrote: >i don't think there is a need for all those variants. why would alarm >need any special opcode when it is just a timer with a delay of abs_time >- NOW? let the coder handle that and lose the extra op codes. No, you don't want to do it that way. Becasue you want to make the latency bet

Re: A12: default accessors and encapsulation

2004-04-20 Thread mark . a . biggar
> On 4/19/04 3:58 PM, Austin Hastings wrote: > One work-around might be an alternate kind of default accessor that doesn't > allow assignment: > > $dog.name # get > $dog.name('foo') # set > $dog.name = 'foo' # compile-time error I think we already have this. Just define a

Re: Apocalypse 12

2004-04-19 Thread Mark A. Biggar
Brent 'Dax' Royal-Gordon wrote: chromatic wrote: Perl.com has just made A12 available: I started reading it last night, and ended up going to bed before I was finished. But I just wanted to say that this: With this dispatcher you can continue by saying "next METHOD". is the sort of geni

Re: Apocalypse 12

2004-04-19 Thread Mark A. Biggar
Brent 'Dax' Royal-Gordon wrote: chromatic wrote: Perl.com has just made A12 available: I started reading it last night, and ended up going to bed before I was finished. But I just wanted to say that this: With this dispatcher you can continue by saying "next METHOD". is the sort of geni

Re: Load paths

2004-03-25 Thread mark . a . biggar
Dan wrote: > At the moment I'm thinking of the load path as an array of subs that > get passed in the file being looked for and return... something. I'm > not sure what, though. Don't reinvent the wheel here. Obviously what should be return is an URI. If we start off only supporting "file://...

Re: [perl #27690] Numeric comparison bug

2004-03-19 Thread mark . a . biggar
The real problem is that you always want to use exactly the same code for ALL cases of string-to-float conversion. The first public example of this problem was the FORTRAN II compiler from IBM in the 60's. The compiler and the IO library was written by two different people and so constants in pro

Re: Method caches

2004-03-17 Thread mark . a . biggar
Don't forget about cache invalidation on dynamic method redefinition. -- Mark Biggar [EMAIL PROTECTED] > Okay, so it's method cache time. > > First important note: I've never done this before (I think my > antipathy towards objects might've given everyone just the tiniest > clue :) so pointers

Re: Latin-1-characters

2004-03-16 Thread mark . a . biggar
Another possibility is to use a UTF-8 extended system where you use values over 0x10 to encode temporary code block swaps in the encoding. I.e., some magic value means the one byte UTF-8 codes now mean the Greek block instead of the ASCII block. But you would need broad agreement for that t

Re: Dates and Times

2004-03-03 Thread mark . a . biggar
> What I'm thinking we may want to do is provide a minimal > interface--turn the time integer into a string rep or split out into > an array, something like: > > localtime Sx, Iy > gmtime Sx, Iy > You almost have to provide at least these, as you have to deal with how various OS's ha

Re: Exegesis 7: Overflow Fields

2004-02-29 Thread Mark A. Biggar
Damian Conway wrote: But that means I have to pre-process data lists that just happen to contain empty strings so that they won't disappear on me. Huh? An empty string already *has* disappeared on you. ;-) > This seems to violate least surprise. I'd be much more surprised if an empty string *

Re: Exegesis 7: Overflow Fields

2004-02-29 Thread Mark A. Biggar
Damian Conway wrote: Mark A. Biggar wrote: What if I want to interpolate an empty string and let the fill characters work? Then you interpolate a single fill character instead of the empty string. But that means I have to pre-process data lists that just happen to contain empty strings so

  1   2   >