that everyone
is picking-and-choosing what they want from other programming
languages. So I'd like to ask whether this is legal or not and why?
--
Markus Laire
On 10/23/06, Smylers [EMAIL PROTECTED] wrote:
Markus Laire writes:
Does anyone know if programming languages are protected by copyright
or not?
Code can be copyrighted; ideas can't be.
Yes, but the syntax of the programming language is more than just an idea.
Copyright-article[1
dereferencers, since you can always put them
S02 inside the closure. The expression inside is evaluated in scalar
S02 (string) context. You can force list context on the expression using
S02 the Clist operator if necessary.
--
Markus Laire
{
...
}
else {
...
}
is same as
if $foo == 123 {
...
}; # -- notice the semicolon here
else {
...
}
because if-statement could end there.
--
Markus Laire
do
I get access to the outer loop variable, which of course, you cannot for
the reasons stated above.
What about $OUTER::_ ? Shouldn't that access the outer $_ ?
Let's get P6 out the door, and then discuss what tiny details like this
do or don't make sense.
--
Markus Laire
, applying a statement modifier to a do block is
specifically disallowed
Oh. For some reason, I thought this exception was for loops only.
According to S04 Cdo { ... } is a loop, The do-once loop.
--
Markus Laire
as C[+] 0,1,2,3 is equivalent to C0+1+2+3?
So why is there C: instead of C, after C@foo?
Does this have something to do with the fact that C@args is
C[EMAIL PROTECTED],1,2,3 and not C@foo,1,2,3?
--
Markus Laire
On 9/23/06, Audrey Tang [EMAIL PROTECTED] wrote:
在 Sep 23, 2006 8:36 PM 時,Markus Laire 寫到:
On 9/23/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
@args = [EMAIL PROTECTED],1,2,3;
-push [,] @args;# same as push @foo,1,2,3
+push [,] @args;# same as push(@foo: 1,2,3)
I
so IMHO C[,](1,2,3)
should be same as C1,2,3 but S06 says that it becomes C\(1,2,3).
--
Markus Laire
over screaming ;)
That would be quite close to [\+] [\,] etc.. from S03:
S03 say [\+] 1..* # (1, 3, 6, 10, 15, ...)
--
Markus Laire
| Bool::True)
--
Markus Laire
trait
are considered, and the best matching default routine is used. If
there are no default routines, or if the available defaults are also
tied, a final tie-breaking proto sub is called, if there is one (see
above). Otherwise an exception is thrown.
/quote
--
Markus Laire
;
+
+is equivalent to
+
+@a = 1, 2, 3, 4;
Shouldn't this be
@a = 1, '2', '3', 4;
--
Markus Laire
On 8/18/06, Larry Wall [EMAIL PROTECTED] wrote:
On Fri, Aug 18, 2006 at 12:56:30PM +0300, Markus Laire wrote:
: What about combined short switches like C-abc to mean C-a -b -c?
: Will perl6 support this notation or not?
Hmm, that opens up a world of hurt. Either you have to distinguish a
--abc
for they
comparison than more cryptic eqv.
Also, == does simpler comparison than eq, so I feel that === should
also do simpler (to understand) comparison than eqv
--
Markus Laire
assignment,
it replaces the container itself. For instance:
my $x = 'Just Another';
my $y := $x;
$y = 'Perl Hacker';
After this, both $x and $y contain the string Perl Hacker, since
they are really just two different names for the same variable.
/quote
--
Markus Laire
On 8/16/06, Dr.Ruud [EMAIL PROTECTED] wrote:
Markus Laire schreef:
my $x = 'Just Another';
my $y := $x;
$y = 'Perl Hacker';
After this, both $x and $y contain the string Perl Hacker, since
they are really just two different names for the same variable.
/quote
So $x === Sy
; # This doesn't affect $foo
Of course, type-allowed mutation of $bar will affect $foo if $bar is
mutable type.
Still, thanks for clarification - I misunderstood what you meant with
someone else holding another symbol.
--
Markus Laire
.
--
Markus Laire
term is considered a feed to the lexically
Piping should probably be changed to something else.
--
Markus Laire
from S12
BUILD, BUILDALL, CREATE, DESTROY, DESTROYALL
Pseudo-class from S12
WALK
I might've missed some.
So making statement modifiers uppercase would just be an another place
where perl6 uses uppercase reserved words.
--
Markus Laire
On 7/20/06, Smylers [EMAIL PROTECTED] wrote:
Markus Laire writes:
S04 seems to say that a style like this can't be used by
perl6-programmers:
loop
{
...
}
while $x;
I like this style, as it lines up both the keywords and the curlies.
As of yesterday you can get very close
necessary to make this programming-style
invalid for perl6? This style is used at least by GNU Coding
Standards (section 5.1) at
http://www.gnu.org/prep/standards/standards.html
I also like this style, as it lines up both the keywords and the curlies.
--
Markus Laire
, and means
+
+q:n /stuff/
+
+while
Since quotes can have whitespace before the first/opening delimiter,
but functions can't (according to S03), how is Cq () parsed? (Notice
the space before parens).
Would that be parsed as invalid function-call (i.e. syntax error) or
valid quote?
--
Markus
])
--
Markus Laire
to be careful about what was allowed
to be passed to the subroutine. Autoconversion seems to defeat that.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
--
Markus Laire
* and C** forms are probably only
-useful in dimensional list contexts.
Is there any new format to do the equivalent of C@foo[1;**;5], or is
that impossible nowadays?
--
Markus Laire
[=] @array) @array
would give first 4 elements of @array, i.e. (1, 0, -1, -2)
--
Markus Laire
In the previous mail I accidentally read [=] as [=]
On 5/10/06, Markus Laire [EMAIL PROTECTED] wrote:
filter (list [=] @array) @array ==
first monotonically non-decreasing run in @array
So @array = (1 0 -1 -2 -1 -3) == (1, -1) is monotonically non-decreasing?
This would
On 5/9/06, Jonathan Scott Duff [EMAIL PROTECTED] wrote:
On Tue, May 09, 2006 at 06:07:26PM +0300, 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)
I noticed this in earlier posts and thought it odd that anyone
)
--
Markus Laire
)
--
Markus Laire
There is a typo in S09 (patch included)
Also, S09 uses postfix ... to mean ..Inf but S03 uses ..* for this, so
one of these should likely be changed unless both are OK.
--
Markus Laire
patch-S09
Description: Binary data
syntax:
%monsters.{'cookie'} = Monster.new;
%people\ .{'john'} = Person.new;
%cats\ .{'fluffy'} = Cat.new;
/quote
--
Markus Laire
patches would be
easier?
--
Markus Laire
On 5/4/06, Juerd [EMAIL PROTECTED] wrote:
Markus Laire skribis 2006-05-04 14:55 (+0300):
When reading Synopses, I sometimes notice some mistakes or typos,
which I'd like to submit a patch for, but it's not easy to do so as I
don't know where to get the source.
Have you tried s/html/pod
On 5/4/06, Paul Johnson [EMAIL PROTECTED] wrote:
On Thu, May 04, 2006 at 01:56:44PM +0300, Markus Laire wrote:
Thanks for taking the time to explain this. The long dot here does seem to be
solving more important problems. Now I'm not as up to date with Perl 6 syntax
as I once was, nor as much
or a Range object.
So you can just put any closure which returns Int or Range directly
within the curlies.
--
Markus Laire
to the first quote.
--
Markus Laire
the key for some reason, you can always
set .pos to $KEY.beg, or whatever the name of the method is. Hmm,
that looks like it's unspecced.
This seems interesting. From day-to-day it becames harder to fully
understand this perl6 thing, but I like it :)
--
Markus Laire
of ( ... )
(result capture)?
--
Markus Laire
{say 'smaller'}
is same as
if $x == 5 {say 'smaller'}
--
Markus Laire
Sam Vilain wrote:
ps, X11 users, if you have any key bound to AltGr, then AltGr + C
might well give you a ¢ sign without any extra reconfiguration.
For me AltGr + C gives Copyright-symbol ©.
(SuSe 9.1, tested in konsole, kwrite and thunderbird)
--
Markus Laire
graphics area\n;
exit 2;
}
// do something
DrawLine(0, 0, 99, 99);
// ...
--
Markus Laire
in r3723
and
pugs my @m = ([1,2],[3,4])
({ref:Array}, {ref:Array})
pugs @m[0,1]
({ref:Array}, {ref:Array})
pugs @m[0..3]
({ref:Array}, {ref:Array}, undef, undef)
--
Markus Laire
]
(3, 4)
pugs @m[0][0]
(1, 2)
pugs @m[0][0][1]
2
@m = [[1,2],[3,4]] IS NOT same as @m = ([1,2],[3,4])
pugs my @m = ([1,2],[3,4])
({ref:Array}, {ref:Array})
pugs @m[0]
(1, 2)
pugs @m[0][1]
2
--
Markus Laire
Juerd wrote:
Juerd skribis 2005-05-14 17:23 (+0200):
Markus Laire skribis 2005-05-14 18:07 (+0300):
[+^=] (@a, @b, @c)
These arrays flatten first (otherwise [+] @foo could never calculate the
sum of the elements), so imagine that you have
$foo, $bar, $baz, $quux, $xyzzy
to let +^= operate
@c = (100,200,300);
[+=] (@a, @b, @c);
# i.e. @a += @b += @c
# now @c = (100, 200, 300)
# @b = (110, 220, 330)
# @a = (111, 222, 333)
--
Markus Laire
Jam. 1:5-6
')
pugs map { $_.from } [split /(..)*/, 1234567890][1]
(0, 2, 4, 6, 8)
--
Markus Laire
Jam. 1:5-6
that slightly inconsistent with :p meaning :p(1) the so-called
real winner for passing boolean options of A12?
Perhaps spec should be changed so that :p means :p(bool::true) or :p(?1)
and not :p(1)
--
Markus Laire
Jam. 1:5-6
],$b)} = $c }
ps. I'm not 100% sure if I got that ([EMAIL PROTECTED],$b) right. I want to add $b to
@a and feed it to dims as one list.
--
Markus Laire
Jam. 1:5-6
= $speed_a - $speed_b;
--
Markus Laire
Jam. 1:5-6
it by one char...
(Not sure if I like this at all - just an idea...)
--
Markus Laire
Jam. 1:5-6
What should index(Hello, , 999) return in perl6?
In perl5 that returns 5, but IMHO -1 would be right result.
--
Markus Laire
Jam. 1:5-6
possible
match to this equation?
How would I rewrite this example to be more general, so that given 3
strings (in this case 'send', 'more', 'money'), the program would give
all possible results for the equation first string + second string =
third string.
--
Markus Laire
Jam. 1:5-6
as 'le') - and of course boolean versions ?== and ?!= (The others
really don't have use with just 2 possible values.)
Then a programmer could write
while foo() ?== true {...}
and it would be ok. After all, perl is all about giving more than one
way to do it.
--
Markus Laire
Jam. 1:5-6
operators to return one of (yes, no,
sometimes) instead of plain (true, false) :)
Anyway, what are the usual semantics with junctions boolean operators
in some other languages? (This is so new concept to me, that I don't
know of any language to compare against.)
--
Markus Laire
Jam. 1:5-6
sigil?
Luke
--
Markus Laire
Jam. 1:5-6
messages going there now, but at least I don't receive
them via perl6-all, only via perl6-documentation
(I'm on both lists, just in case)
--
Markus Laire 'malaire' [EMAIL PROTECTED]
people who only needs chars a-z
in his language. But for all others (think about Chinese), Unicode is
real asset.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
to allow this.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
of a XIM
implementation for general Unicode. (Although if you log into your
Unix machine using Kermit-95, it has a keystroke sequence for
arbitrary Unicode input).
Emacs and vim also works on Windows, not just UNIX.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
On 29 Oct 2002 at 11:22, Jonathan Scott Duff wrote:
On Tue, Oct 29, 2002 at 10:13:39AM +0200, Markus Laire wrote:
Also the idea of allways using 'function' style for something so
basic like superpositions doesn't appeal to me.
Superpositions are basic in a fabric-of-the-universe kind
would ('a' .. 'z') - 1 mean?
If we are going to do math with ranges, we definitely need non-
discreet ranges also. Or at least make sure it's easy enough to
implement as a class.
(1.9 .. 2.1) + (5..7) * (72.49 .. 72.51);
--
Markus Laire 'malaire' [EMAIL PROTECTED]
^[+]
What are the good reasons not to use «» ?
--
Markus Laire 'malaire' [EMAIL PROTECTED]
On 30 Oct 2002 at 15:24, Jonathan Scott Duff wrote:
On Wed, Oct 30, 2002 at 11:10:54PM +0200, Markus Laire wrote:
If we are going to do math with ranges, we definitely need non-
discreet ranges also. Or at least make sure it's easy enough to
implement as a class.
(1.9 .. 2.1) + (5..7
perfectly.
Also the idea of allways using 'function' style for something so
basic like superpositions doesn't appeal to me. Of course this might
just be that I'm too used to use strange mathematical symbols.
(Nobody ever understood my solutions in high-school...)
--
Markus Laire 'malaire
?
While we're at it, maybe we can add in 0rMCM to allow roman numerals
too... --
What about specifying endiannes also, or would that be too low-level
to even consider? Currently I don't have any examples for where it
might even be used...
--
Markus Laire 'malaire' [EMAIL PROTECTED]
6: /(.*?) [after: union | $$]/
IMHO those should scan string one char at a time until 'union' or end-
of-string, which is optimal solution.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
On 22 Sep 2002 at 21:06, Simon Cozens wrote:
[EMAIL PROTECTED] (Markus Laire) writes:
While commit and cut don't follow same syntax, I don't really see
any better solutions.
commit is sufficiently hard that it musn't be confused with the
colon series.
Yes, I didn't think that enough
' used testcases like
(18*16*16*5-1+12+15+18*1-8+6/7-6-2-(19)*(17))+8+((9/14))
This is valid mathematical expression in perl5 but would do something
totally different in perl6 because of those 'one-element lists'
--
Markus Laire 'malaire' [EMAIL PROTECTED]
/
Because it's good to have MTOWTDI. (= More than one way to do it)
--
Markus Laire 'malaire' [EMAIL PROTECTED]
() is captured and assigned to $1.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
/renumbering' instead of
'binding' in A5 for numeric variables.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
a challenge...
(only 32bit numbers, modulo not fully working, no capturing regexps,
)
And I'm definitely going to try any future PerlGolf challenges also
in perl6.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
:
:/::/:::/commit makes backtrack fail current atom/group/rule/match.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
expressions in Perl are really far from being regular.
for technical definition, you can check e.g.
http://www.wkonline.com/d/Finite_State_Machine.html
but that is most likely not understandable without prior knowlegde.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
successfully processed input when
matching from an input stream or an iterator of arbitrary length.
--
Markus Laire 'malaire' [EMAIL PROTECTED]
79 matches
Mail list logo