perl6 taint other traits

2005-04-17 Thread BÁRTHÁZI András
Hi, In Perl5 there can be a flag on a variable, that shows, if it's tainted or not. I would like you to ask, if it will be possible the same with Perl 6, or - and I'm most interested in this -, if it's possible to create something like this by me (defining meta information on variables, that

embedding languages in Perl 6

2005-04-20 Thread BÁRTHÁZI András
Hi, I'm just wondering, if the following would be possible with Perl 6 or not? XML $a=elemselemContent #1/elemelemContent #2/elem/elems; say $a.elems[0].elem[1].content; # Content #1 for ($a.elems) { say $_.content; } or XPath like syntax on a structure? SQL $a=select * from table; for(select *

Re: embedding languages in Perl 6

2005-04-20 Thread BÁRTHÁZI András
Hi, : I'm just wondering, if the following would be possible with Perl 6 or not? : : XML : : $a=elemselemContent #1/elemelemContent #2/elem/elems; : : say $a.elems[0].elem[1].content; # Content #1 : : for ($a.elems) { say $_.content; } : : or XPath like syntax on a structure? That's

Re: Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread BÁRTHÁZI András
Hi, What is the benefit of this syntax over having a simple function that takes one argument, interpolating variables from CALLER::? for sql 'SELECT * FROM table WHERE id=$id' { ... } The difference is between compile time parsing and runtime parsing. This expression can be transformed to a

Re: Perl development server

2005-05-23 Thread BÁRTHÁZI András
Hi, I'd like one. Sure - just think of a nice catchy username! :) I'd like another one, as boogie. I think now, that I will use it, but I have a lot of jobs these days, with higher priorities :( than Perl6. dev.pugscode.org seems indicated ... Sorry, but 'dev' isn't cute enough :).

Re: Hackathon users (was: Perl development server)

2005-05-23 Thread BÁRTHÁZI András
Hi, Thomas Klausner skribis 2005-05-23 18:03 (+0200): While I will inform everyone what they need, I'm sure quite a lot people will show up without a fresh checkout of the various repositories. So if I can get a number of dummy accounts (to be deleted after the event) that would be great!

Re: Perl development server

2005-05-23 Thread BÁRTHÁZI András
Hi, I think, the cute name can be about animals. A camel and a parrot are in my mind. Parrot can't be, because that's also the name of one of the projects, and I want to avoid confusion. I just thinking something related these animals, not the animal. Maybe feather, etc. It's not the big

Re: Perl development server

2005-05-24 Thread BÁRTHÁZI András
Hi, Just to know, onion in Hungarian is hagyma. ;) Bye, Andras On Tue, 24 May 2005, wolverian wrote: On Tue, May 24, 2005 at 12:12:57PM +0200, Juerd wrote: I'm currently considering 'ui', which is Dutch for 'onion'. I bet almost nobody here knows how to pronounce ui ;) That reads 'user

Re: reduce metaoperator on an empty list

2005-06-01 Thread BÁRTHÁZI András
Hi, You have to either supply an initial value or refactor your logic not to allow an empty @array (as in the first case). If you want it some other way, there are far too many special cases we have to work with, some of which are just mathematically impossible. I think `fail`ing is the best

My presentation on last weekend

2005-06-01 Thread BÁRTHÁZI András
Hi, I just would like to share it with you. We had a weekend at the lake Balaton on the last weekend, where I had a talk about Perl 6. The guys liked it (the girls had sunbath during the event :), and one of them (Poetro) said the summary: then we can say, that Perl 6 is an operator

using rules

2005-06-03 Thread BÁRTHÁZI András
Hi, I'm working on a web templating system, and I'm wondering how should I use rules? I have these defs: rule elem { \ wts \: ([a..z]+) \/ \ } rule block { \ wts \: ([a..z]+)\(.*?)\ \/ wts \: $1 \ } I would like to execute subroutines during the evaluation. What should I

flattening arguments

2005-06-05 Thread BÁRTHÁZI András
Hi, From the Perl6 and Parrot Essentials: - 8 - sub flat_hash ($first, $second) { say first: $first; say sec. : $second; } my %hash = (first = 1, second = 2); flat_hash(*%hash); - 8 - It says, that No compatible subroutine found. I've modyfied the subroutine: -

Re: using rules

2005-06-05 Thread BÁRTHÁZI András
Hi, No ideas? Bye, Andras I'm working on a web templating system, and I'm wondering how should I use rules? I have these defs: rule elem { \ wts \: ([a..z]+) \/ \ } rule block { \ wts \: ([a..z]+)\(.*?)\ \/ wts \: $1 \ } I would like to execute subroutines during the

Re: using rules

2005-06-05 Thread BÁRTHÁZI András
Hi, I'll take a shot at it since no one else seems to want to. :-) Hope this is helpful. Corrections are welcome from anyone who spots any mistakes. Thanks, it helped me! More questions. ;) It seems to me, that the following constructs not yet(?) implemented in Pugs. Is it true?

PGE error?

2005-06-10 Thread BÁRTHÁZI András
Hi, I don't know what happens and where in the code, but... Anyway, it's strange... I have this code and input.tpl: --- 8 --- rule sp { [ ] } rule id { [a..z][a..z0..9]+ } sub do($match) { say $match[0]; return +; } my

proposal: binding with a function

2005-06-14 Thread BÁRTHÁZI András
Hi, As I know, for binding, you can use the := operator, and just this: $a := $b; I would like to make a proposal, based on Ruby[1]: alias $a, $b; It's a fun: sub newline { \n x $_; } alias newlines, newline; So you can write: print 5.enters; Currently, you have to

new mailing list: perl6-general?

2005-06-14 Thread BÁRTHÁZI András
Hi, I would have some general Perl6 programming questions. Where should I ask them? It's not about language design, not about compiling/compilers and even not related to the internals. As more and more people will start hacking Perl6, I think, that it would be useful to having a list for

Re: new mailing list: perl6-general?

2005-06-14 Thread BÁRTHÁZI András
Hi, So, that leaves either perl6-language or a new list. Personally I could see it going either way -- even though general Perl6 programming questions aren't directly about language design, it may still be useful to language designers to see the types of questions that people are asking and to

Re: new mailing list: perl6-general?

2005-06-14 Thread BÁRTHÁZI András
Hi, Anyway, I understand why you wrote what you wrote, so as there will be no decision, I'll ask my questions on perl6-compiler. I mean, perl6-language. Bye, Andras

Creating a web templating engine

2005-06-14 Thread BÁRTHÁZI András
Hi, I'm busy with creating a widget based web templating engine, but I have some problems, please help me. The engine would allow you to define widgets, and use those in your templates. I would like it to be an OO module. In the template, you can write this: server:input id=name

Re: Creating a web templating engine

2005-06-14 Thread BÁRTHÁZI András
Hi, $wte = new WTE; $wte.register('input', my_input_widget); I don't prefer it, to be 20-30 register line in my programs, that does nothing, just register. maybe something like this? class MyWTE is WTE { method input (...) {...} method some_other_thing_you_would_have_had_to_register

Re: proposal: binding with a function

2005-06-15 Thread BÁRTHÁZI András
Larry, You can always write a macro that does that. [...] That won't work on a method name anyway unless you do it in the dispatch class. [...] You'll have to write your own macro if you want to do that. As I understood, you wrote down, how I can workaround it with macros, and why it

Re: proposal: binding with a function

2005-06-15 Thread BÁRTHÁZI András
Hi, Carl Franks wrote: : alias newlines, newline; Isn't it possible to add a Role to the relevant Class, which specifies that is 'handles' the method name you want as an alias? If it's possible, it would be fine for me in this particular case. Is it possible? Anyway, IMHO this alias

Re: new mailing list: perl6-general?

2005-06-15 Thread BÁRTHÁZI András
Hi Michele, Where should I ask, that what's PGE means? Yes, I know, it's Parrot Grammar Engine, and I know what it is, but a beginnner maybe not. And I think that Which makes me think that first or later it may be worth to start a FAQ for questions like these even if they're not frequently

Re: new mailing list: perl6-general?

2005-06-16 Thread BÁRTHÁZI András
Hi, I think, that David's version is matches with my opinion. I don't think, that beginners would be a better name for it, but maybe more practical, as it's a more evident name. Bye, Andras David Storrs wrote: On Jun 15, 2005, at 3:33 PM, Patrick R. Michaud wrote: And here they are...

Re: new mailing list: perl6-general?

2005-06-16 Thread BÁRTHÁZI András
Hi, Fagyal Csongor wrote: I think, that David's version is matches with my opinion. I don't think, that beginners would be a better name for it, but maybe more practical, as it's a more evident name. Hmmm, I think beginner is a little negative. What about professional Perl5 programmers,

Re: proposal: binding with a function

2005-06-20 Thread BÁRTHÁZI András
, kilobyte; So both routines will be an exported one. You can use this code then: say 1.kilobyte; say 2.kilobytes; Bye, Andras BÁRTHÁZI András wrote: Larry, You can always write a macro that does that. [...] That won't work on a method name anyway unless you do it in the dispatch class

proposal: 404 method

2005-06-20 Thread BÁRTHÁZI András
Hi, Is there a way, to catch, if I call a method, that doesn't exists, to run a default one? I'm thinking about an error handler method. If not, I would like to propose this: class MyClass { method example ($self: $var) { say HELLO; } method default

Re: proposal: 404 method

2005-06-20 Thread BÁRTHÁZI András
Hi, Is there a way, to catch, if I call a method, that doesn't exists, to run a default one? I'm thinking about an error handler method. See all the AUTO subs. Cool! Where? Is it working currently with Pugs? Bye, Andras

Re: proposal: binding with a function

2005-06-20 Thread BÁRTHÁZI András
Hi, - in natural languages, synonims are very often - alias is a synonim Perl is modeled on natural languages, but that doesn't mean it is one. At its core, Perl is a limited, artificial language being explicitly designed with certain goals. One of those goals is that it should be as small

Re: proposal: binding with a function

2005-06-20 Thread BÁRTHÁZI András
Hi, kilobytes := kilobyte; will not work for you (try it), because you have to declare the variable kilobytes - in the default strict mode. But you can't say for ex. my kilobytes, if you want to export it. So you say `our kilobytes ::= kilobyte` (or `:=`, you still haven't said if alias works

OO magic (at least for me)

2005-06-26 Thread BÁRTHÁZI András
Hi, I'm wondering, if it's possible with Perl 6 or not? class MyClass { method mymethod($par) { say mymethod called!; } } class ExClass is MyClass { mymethod(12); } # pugs myprog mymethod called! I would like to use mymethod to add ExClass some

Re: OO magic (at least for me)

2005-06-26 Thread BÁRTHÁZI András
Hi! I'm trying to answering my questions. Still interested in some official answer. :) --- 8 --- 8 --- 8 --- 8 --- 8 --- 8 --- 8 --- class MyMethod { method fun1() { fun2(); } method fun2() { say fun2!; } } class Child is MyMethod { } Child.fun1(); --- 8 ---

Re: OO magic (at least for me)

2005-06-26 Thread BÁRTHÁZI András
Hi, method fun1() { fun2(); } method fun2() { say fun2!; } *** No compatible subroutine found: fun2 fun2 is a method, not a sub. You need method syntax to call it: ./fun2; Hmm. It really works. :) I'm getting the idea, what's the difference between methods and subs. Anyway, my