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.
Copyri
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
tem *
S02>
S02> A bare closure also interpolates in double-quotish context. It may
S02> not be followed by any 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 C operator if necessary.
--
Markus Laire
foo == 123 {
...
}
else {
...
}
is same as
if $foo == 123 {
...
}; # <-- notice the semicolon here
else {
...
}
because if-statement could end there.
--
Markus Laire
tement):
>"Unlike in Perl 5, 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 C is a loop, "The do-once loop".
--
Markus Laire
is ambiguous though.
It really is, and the very first question that everyone asks is: how 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, an
y different.
As an example, C<[+](1,2,3)> is same as C<1+2+3> so IMHO C<[,](1,2,3)>
should be same as C<1,2,3> but S06 says that it becomes C<\(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
>> +pu
t;[EMAIL PROTECTED],1,2,3> just as C<[+] 0,1,2,3> is equivalent to C<0+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
infix:<☥> ($l,$r) {
return "The $l wise men spent $r days";
};
sub infix:<☆> ($l,$r) {
return "$l following a star in the $r-th heaven";
};
sub infix:<☺> ($l,$r) {
return "$l to become very happy for $r days and nights"
};
--
Markus Laire
in-editor parsers fall over screaming ;)
That would be quite close to [\+] [\,] etc.. from S03:
S03> say [\+] 1..* # (1, 3, 6, 10, 15, ...)
--
Markus Laire
pugs> any(@a) ~~ { $_ % 2 }
(Bool::False | Bool::True)
--
Markus Laire
On 9/9/06, Conrad Schneiker <[EMAIL PROTECTED]> wrote:
In:
Perl 6 Design Minutes for 23 August 2006
http://use.perl.org/articles/06/09/08/2238219.shtml
I saw this intriguing news:
"Mozilla Foundation wants to know how they can help Perl 6"
Support for
On 9/2/06, Markus Laire <[EMAIL PROTECTED]> wrote:
On 9/2/06, Audrey Tang <[EMAIL PROTECTED]> wrote:
> This is quite strange, as I cannot duplicate this failure mode; neither can
> others in #perl6. Nevertheless, I've attempted a fix. Can you try
> again with r1294
On 9/2/06, Audrey Tang <[EMAIL PROTECTED]> wrote:
2006/9/2, Markus Laire <[EMAIL PROTECTED]>:
> On 9/2/06, Audrey Tang <[EMAIL PROTECTED]> wrote:
> > 2006/9/2, Markus Laire <[EMAIL PROTECTED]>:
> > > I tried to compile pugs r12925 with parrot r14364 (bot
On 9/2/06, Audrey Tang <[EMAIL PROTECTED]> wrote:
2006/9/2, Markus Laire <[EMAIL PROTECTED]>:
> I tried to compile pugs r12925 with parrot r14364 (both current as of
> yesterday) and "make" for pugs failed with this message:
Heya. r12925 is at the middle of gaal
is "No such file or directory" in english.
I checked src/perl6/Prelude.pm but didn't see anything interesting on
line 682. Maybe the linenumber was wrong?
My system is Knoppix 4.0.2 CD + ghc 6.4.1 from Debian-backports.
$ uname -a
Linux Knoppix 2.6.12 #2 SMP Tue Aug 9 23:20:52 CEST 2005 i686 GNU/Linux
--
Markus Laire
less there's a tie, in
which case the tied candidates are redispatched using any additional
tiebreaker long names (see below).
If a tie still results, only candidates marked with the default 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.
--
Markus Laire
ntext. Therefore
+
+@a = 1, < 2 3 >, 4;
+
+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 hav
short switches like C<-abc> to mean C<-a -b -c>?
Will perl6 support this notation or not?
--
Markus Laire
many other languages uses 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
they were mutable types:
$bar = [1,2];
$foo = $bar;
...
$bar = 123; # 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
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 r
assignment. It is performed with the := operator.
Instead of replacing the value in a container like normal 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.
--
Markus Laire
broutine extends from that statement to the end of the file, as C and
-C declarations do).
-
Redefining a stub subroutine does not produce an error, but redefining
an already-defined subroutine does. If you wish to redefine a defined sub,
you must explicitly use the "C" trait.
====
--
Markus Laire
+Piping to the C<*> "whatever" term is considered a feed to the lexically
"Piping" should probably be changed to something else.
--
Markus Laire
rom S10
AUTODEF, CANDO
Submethods 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 c
;s 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
s fine, 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 C parsed? (Notice
the space before parens).
Would that be parsed as invalid function-call (i.e. syntax error) or
valid quote?
--
Markus Laire
irst
passes stuff, second passes [stuff])
--
Markus Laire
ther can Int ever be "best candidate" for Num, because
they are different types?
The programmer put type information in the sig for a reason. I think
that reason is that they wanted 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
in my example the (String, Int) version
would be called because it's "the best candidate". And that would also
mean that first Int is automatically converted to String.
--
Markus Laire
Range-example is my quess of how Range could be used with "for".
I'm not 100% sure if that syntax is OK.
How do I extend the example to really check the parameter types. Some
kind of "use strict" anywhere?
I think that parameter types are automatically checked.
Also "use strict;" is default in perl6, but that's a bit different thing IMHO.
--
Markus Laire
llow.
[1] http://www.nntp.perl.org/group/perl.perl6.meta/989
[2] http://www.nntp.perl.org/group/perl.perl6.announce/511
--
Markus Laire
t. The argumentless C<*> 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
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
And here I mis-read < as <=.
Perhaps I should stop "fixing", as I'm making too many errors here...
On 5/10/06, Markus Laire <[EMAIL PROTECTED]> wrote:
> > filter (list [<] @array) @array ==>
> > first monotonically increasing run in @
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) ==>
<= 0 <= -1 <= -2,
1 <= 0 <= -1 <= -2 <= -1,
1 <= 0 <= -1 <= -2 <= -1 <= -3
==>
Bool::True, Bool::True, Bool::True, Bool::True, Bool::False, Bool::False
And so
filter (list [<=] @array) @array
would give first 4 elements of @array, i.e. (1, 0, -1, -2)
--
Markus Laire
1-argument case.
i.e. should list([+] 1) return (0, 1) or (1)
--
Markus Laire
i.e. [+]
with no arguments)
--
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
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
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 sour
, so that submitting patches would be
easier?
--
Markus Laire
ill possible to align accessors by explicitly using
the long dot syntax:
%monsters.{'cookie'} = Monster.new;
%people\ .{'john'} = Person.new;
%cats\ .{'fluffy'} = Cat.new;
--
Markus Laire
lies are taken to be a closure
returning an Int or a Range object. "
So you can just put any closure which returns Int or Range directly
within the curlies.
--
Markus Laire
to reset to before the key for some reason, you can always
> set .pos to $.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
7;s just counted as "matched", whatever that means, and why the
description is so dis-similar to the first quote.
--
Markus Laire
code assertion) instead of <( ... )>
(result capture)?
--
Markus Laire
e it.
ps. The syntax might be wrong, as I don't program in parrot. I'm just
following the conversation.
--
Markus Laire
f $x <= 5 && $x <= 5 {say 'smaller'}
>
> can be permuted into
>
> if $x <= 5 && 5 > $x {say 'smaller'}
>
> and optimized to
>
> if $x == 5 {say 'smaller'}
Do you claim that
if $x <= 5 && $x <= 5 {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
Bryan Burgers wrote:
On 10/15/05, Luke Palmer <[EMAIL PROTECTED]> wrote:
On 10/14/05, Markus Laire <[EMAIL PROTECTED]> wrote:
Perl does have CPAN, but the problem is that there are no standard
modules, and so there can be several modules doing the same thing.
And what is the
if (!InitGraphics(100, 100, 24)) {
print "Couldn't get 100x100x24 graphics area\n";
exit 2;
}
// do something
DrawLine(0, 0, 99, 99);
// ...
--
Markus Laire
se anymore.
--
Markus Laire
aire/omat/downloads/direct-devel-downloads/temp/pugs/blib/lib',
'/home/malaire/omat/downloads/direct-devel-downloads/temp/pugs/blib/arch')"
t/oo/destruction.t
--
Markus Laire
give up now!
Unfortunately I don't know much about debugging nor how to setup such an
account, if it's even possible on my computer. (I have SuSe 9.1 in a
local network, with win98se-computer between internet and this local
network.)
--
Markus Laire
; @m[0][1]
(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:}, {ref:})
pugs> @m[0]
(1, 2)
pugs> @m[0][1]
2
--
Markus Laire
x27;t work in r3723
and
pugs> my @m = ([1,2],[3,4])
({ref:}, {ref:})
pugs> @m[0,1]
({ref:}, {ref:})
pugs> @m[0..3]
({ref:}, {ref:}, undef, undef)
--
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, $
not too familiar with xor, so here's an easier example with plain +=
my @a = (1,2,3);
my @b = (10,20,30);
my @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
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
ch, ::Match, ::Match, ::Match, ::Match)
pugs> map { ~$_ } [split /(..)*/, 1234567890][1]
('12', '34', '56', '78', '90')
pugs> map { $_.from } [split /(..)*/, 1234567890][1]
(0, 2, 4, 6, 8)
--
Markus Laire
est';
$test ~~ s:perl5/(?i)E/OA/;
(?...) is standard perl5-way to place these flags into regexp.
--
Markus Laire
hing we've said for arrays applies to hashes
as well ..."
S04 tells how to process several lists in parallel in for-loop.
S03 tells about unary * list-flattening op.
So what about:
for @b ¥ @c -> $b, $c { $hash->{dims ([EMAIL PROTECTED],$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
ideas to a mathematically minded person...
my $speed_a = 78`Kilometers / 2`Hour;
my $speed_b = 50`(Miles/Hour); # or 50`Miles_per_Hour
my $delta = $speed_a - $speed_b;
--
Markus Laire
xit
CATCH {...} catch exceptions
CONTROL {...} catch control exceptions
--
Markus Laire
of 'x')
Still this only shortens it by one char...
(Not sure if I like this at all - just an idea...)
--
Markus Laire
within curlies are
List-of-lists separators, and not statement-separators?
That looks a lot like normal closure/code-block where ; just separates
different statements.
--
Markus Laire
What should index("Hello", "", 999) return in perl6?
In perl5 that returns 5, but IMHO -1 would be right result.
--
Markus Laire
Andrew Savige wrote:
Oh, and should I add:
use v6;
at the top of my Pugs .p6 scripts? (I have no idea what that does,
just noticed it in some other example scripts).
It tells that script needs perl v6.*.* to work and I think it's good
practise to add that to every perl6 script.
--
Markus Laire
Thanks, applied. :)
--
Markus Laire
« (3,2,1) --> ((1,1,1), (2,2), (3)
1 »xx« (3,2,1) --> ((1,1,1), (1,1), (1))
(20,40,60) »/« (2,5,10) --> (10,8,6)
(1,2,3) »+« (10,20,30) »*« (2,3,4)--> (21,62,123)
((1,2,3) »+« (10,20,30)) »*« (2,3,4) --> (22,66,132)
--
Markus Laire
Index: src/Prim.hs
==
s-project can continue to implement the
various features perl6-language requires.
And of course we will eventually need working Parrot to compile perl6
into a Parrot-code, but I don't know much about that as I'm currently
mainly interested about the development of pugs-project.
--
Markus Laire
@values);
}
How would the if (...) {...} work if there were more than one 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 + =
.
--
Markus Laire
ust 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
he boolean 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
to varrant their own sigil?
Luke
--
Markus Laire
; }
sub infix:<*> (A $a1, A $a2) { print("Multiplication\n"); }
my A $a; # note, I'm not sure how to write this on one line
my A $b;
my A $c;
$c = ($a + $b * $a);
--
Markus Laire
dot or $ depending on the string I know
test will match the rule against (like whether it contains \n or not) -
or should I convert these items allways in the same way.
(Of course once perl6-rules starts working a lot better than now, we
anyway need totally new tests to consider all the new possibilities.)
--
Markus Laire
ring if it would make sense to add the original 're_tests'
file to parrot distribution, with a script which autogenerates
're_tests.t' from it. This way it would be possible to update the script
if testing-format is changed, or if some bigger mistakes are seen.
Of course small errors in 're_tests.t' file could be fixed manually, but
if testing-format it changed, then those changes would be lost when file
was autogenerated again.
--
Markus Laire
(These numbers might be one off, because one test was
commented out).
--
Markus Laire
re_tests.t.tar.bz2
Description: BZip2 compressed data
27;);
# 5: abcaxc n - -
p6rule_isnt('axc', 'abc', 're_tests 3 (#3)');
# 6: abcabx n - -
p6rule_isnt('abx', 'abc', 're_tests 4 (#4)');
# 7: abc xabcy y $& abc
# 8: abcxabcy y $-[0] 1
# 9: abcxabcy y $+[0] 4 # SKIP
p6rule_like('xabcy', 'abc', qr/0: <\Qabc\E @ 1>/, 're_tests 5 (#5)');
...
...
== re_tests.t example ==
--
Markus Laire
I'm currently writing few tests for PGE. So far I've found 2 failing
tests: (with parrot_2004-12-16_160001.tar.gz)
p6rule_like('abcabbc', 'ab+?bc', qr/0: /, '');
p6rule_like('abbcabbbc', 'ab+?', qr/0: /, '');
output from "perl t/harness mytests/*.t" is attached.
Larry mentioned 're_tests' file fr
On 15 Nov 2002 at 12:02, Dave Whipp wrote:
> A couple more corner cases:
>
> $a = 1:0; #error? or zero
Shouldn't base-1 be:
1:0 == 10:0
1:1 == 10:1
1:11 == 10:2
1:111 == 10:3
1:1010111 == 10:5
etc..
Also 0:0 == 10:0
--
Markus Laire 'malaire' <[EMAIL PROTECTED]>
ing full
parrot, perl6, other parrot-supported languaged, etc..
This 2nd step might be e.g. Bytecode-compiled perl6-program which is
simple enough to work with miniparrot.
(Here might be some mistakes, but this is as I understand this, based
on active lurking here)
--
Markus Laire 'malaire' <[EMAIL PROTECTED]>
to provide too exact and final
documentation at once. Just define each area "with enough detail"
(whatever that means) and then move on. Until whole language-design
is somewhat complete, there will be things which requires earlier
decisions to be changed.
--
Markus Laire 'malaire' <[EMAIL PROTECTED]>
. :-)
There are few 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]>
ea of having Unicode
> operators.
It may seem idiotic to the egocentric 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]>
On 31 Oct 2002 at 16:04, Brent Dax wrote:
> Markus Laire:
> # Emacs and vim also works on Windows, not just UNIX.
>
> So does DOS 'edit'. That doesn't mean Windows users use it. Windows
> users want tools that look and act like Windows tools--if they didn
I don't know 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]>
ä jaettuna kaksi
At least it wouldn't harm anyone to allow this.
--
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 backup for those
unfortunates who can't use «+» - like ^[+]
What are the good reasons not to use «» ?
--
Markus Laire 'malaire' <[EMAIL PROTECTED]>
.10)?
>
> And what 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]>
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
; especially seems to be superficial, as it's
just 'this or that' operation in this case, and so single operator
fits 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
1 - 100 of 135 matches
Mail list logo