non-string keys (in a BagHash, for example)

2014-12-01 Thread Theo van den Heuvel
7) Perl6 considers all entries as new, and the hash has 3 separate entries. Do I actually have to project my objects to strings to accomplish this? Thanks -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: problem installing GTK::Simple

2016-06-22 Thread Theo van den Heuvel
Thanks Timo, this brings be further, but not quite out of the woods. I now get the following (Windows 10): # Failed test at t/01-sanity.t line 10 # Dynamic variable @*INC not found with the ensuing failures. Any ideas? thanks, Theo Timo Paulssen schreef op 2016-06-22 18:01: I just

Re: capture through regex variable

2016-02-22 Thread Theo van den Heuvel
Thanks Patrick, it works great. Theo Patrick R. Michaud schreef op 2016-02-22 11:16: Dynamic subregexes such as <$top> are non-capturing by default. You can easily capture the result by using something like

capture through regex variable

2016-02-22 Thread Theo van den Heuvel
{ $match = m/^ <$top>/; } if $match { say "core is { ~$ }"; } = Using the latest rakudo release (2016.01.1), I find that the matching process works but the capture gets lost. Any ideas? Thanks, -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: can a method name contain a funny character?

2016-04-12 Thread Theo van den Heuvel
this is a good idea. On 4/11/16, Theo van den Heuvel <vdheu...@heuvelhlt.nl> wrote: Thanks Larry for the answer and the great language. It is quite ok for me to start alphabetically. I use the funny char to indicate a particular aspect shared by a bunch of subs operators and methods. So I

Re: can a method name contain a funny character?

2016-04-12 Thread Theo van den Heuvel
wrote: On Tue, Apr 12, 2016 at 9:44 AM, Theo van den Heuvel <vdheu...@heuvelhlt.nl> wrote: .. unless you have to process the source code via some other tool that is unable to understand your symbols. I tend to refuse to code using more keys than those in my keyboard, my fault. Luca

can a method name contain a funny character?

2016-04-10 Thread Theo van den Heuvel
t is unexpected for me, but is this as it should be? This is Rakudo version 2016.01.1 built on MoarVM version 2016.01 Thanks, -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: rakudo debugger and files

2016-03-03 Thread Theo van den Heuvel
[ ...] -- Download and unpack the distribut ion and then open the directory with your shell. Maybe I should reinstall. bye, Theo van den Heuvel Theo van den Heuvel schreef op 2016-03-03 22:31: Hi all, for some reason the Rakudo debugger (perl6-debug-m) does not accept any file name if I try and use

Re: rakudo debugger and files

2016-03-04 Thread Theo van den Heuvel
HI all, after reinstalling rakudo panda works. However, the debugger still does not load dependencies. BTW there is no 'perl6-debug', only 'perl6-debug-m' on my machine. thanks, Theo van den Heuvel Theo van den Heuvel schreef op 2016-03-04 00:14: Hmm. This probably is not an issue

rakudo debugger and files

2016-03-03 Thread Theo van den Heuvel
of Rakudo, 2016-1 64-bits on Windows7. Thanks -- Theo van den Heuvel

Re: debugging and HookGrammar

2017-02-28 Thread Theo van den Heuvel
ehash", though I'm not sure if that will help in this case. On Tue, Feb 28, 2017 at 7:55 AM, Theo van den Heuvel <vdheu...@heuvelhlt.nl> wrote: hi everyone, last week I used rakudobrew to update my Perl6 installation on Ubuntu. This is Rakudo version 2017.02-106-gdd4dfb1 built on MoarVM v

debugging and HookGrammar

2017-02-28 Thread Theo van den Heuvel
Perl6::HookGrammar at gen/moar/perl6-debug.nqp:407 (/home/theo/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6-debug.moarvm:comp_unit) followed by a slew of other nqp stuff. Is there something wrong with my installation? Suggestions for repair? Thanks, -- Theo van den Heuvel Malden

Re: debugging and HookGrammar

2017-02-28 Thread Theo van den Heuvel
Elizabeth Mattijsen schreef op 2017-02-28 20:29: That was the consensus on the #perl6-dev channel: https://irclog.perlgeek.de/perl6-dev/2017-02-28#i_14181744 Liz I wasn't aware of this. Thanks -- Theo van den Heuvel

Re: grammars and indentation of input

2016-09-13 Thread Theo van den Heuvel
As so often it turned out that the reason my program did not work was elsewhere (in the grammar). My approach worked al along. It was instructive to look at the examples you guys mentioned. Thanks Theo

grammars and indentation of input

2016-09-13 Thread Theo van den Heuvel
optimization) frustrate this approach. Is there a way to make something like this work? Thanks, Theo -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: debugger dies on me

2016-12-05 Thread Theo van den Heuvel
/.rakudobrew which shouldn't exist if you were using Rakudo Star on its own. Looks like you have mixed up two versions. S -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: debugger dies on me

2016-12-05 Thread Theo van den Heuvel
? thanks, Theo Steve Mynott schreef op 2016-12-05 13:11: If you are using rakudobrew it's not rakudo star (which is built from a source tar ball or supplied as binaries on some platforms). S On 5 December 2016 at 11:34, Theo van den Heuvel <vdheu...@heuvelhlt.nl> wrote: Hi Steve, I have

Re: debugging modules

2017-03-16 Thread Theo van den Heuvel
have trouble getting rakudo to debug some of my own modules. merci, Theo Dominique Dumont schreef op 2017-03-16 16:21: On Friday, 10 March 2017 21:47:13 CET Theo van den Heuvel wrote: Strangely I do get messages like the following + EVAL_1 (1 - 1) | CompUnit::DependencySpecification.new(short

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Theo van den Heuvel
ot; or a long alternation), and then modifying the rules where those reserved words are not allowed to reject them. So for that grammar, you want to change "identifier" to reject :i/WHERE/ The exact method of doing so, I don't know! -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Theo van den Heuvel
however in such a simple case we could just write token idf { $=[ \w+ ] .uc eq 'WHERE' }> } cheers, Theo van den Heuvel schreef op 2017-03-09 19:42: I use something like token idf { $=[ \w+ ] ~~ :i/^ where $/}> } but there are likely to be simpler solutions. yary schreef op 2017

Fwd: Re: Variables in modules

2017-03-09 Thread Theo van den Heuvel
Is this what you are looking for? our $IAm is export; ( $IAm = $?FILE ) ~~ s|.*"/"||; -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: lazy gather?

2017-03-13 Thread Theo van den Heuvel
[^1000]. this works but isn't intellectually right anymore. any idea to make it more appealing ? regards -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: Fwd: Re: Variables in modules

2017-03-10 Thread Theo van den Heuvel
Not with me it doesn't. my $TheValue = $?FILE.subst(/.* "/"/, "", :g); sub sayfn is export { $TheValue.say } Could something else be wrong here? cheers, Theo ToddAndMargo schreef op 2017-03-10 22:10: On 03/10/2017 09:53 AM, Timo Paulssen wrote: I don't quite understand what's wrong with

Re: who own my code?

2017-10-21 Thread Theo van den Heuvel
Hi Todd, please discuss this in an appropriate forum. This discussion has absolutely nothing to do with Perl6. Thanks, Theo van den Heuvel

Re: Tip: my string substitution notes

2018-04-28 Thread Theo van den Heuvel
Hi Todd, please do not reference illegal materials. If you wish to refer to the Perl Cookbook, why not do so. http://shop.oreilly.com/product/9780596003135.do Thanks, Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: using run

2018-06-20 Thread Theo van den Heuvel
Hi Brandon, I used the wrong term there. I meant to say: put in a file. Sorry for the confusion. Theo Brandon Allbery schreef op 2018-06-20 17:58: If you're going to use terms in a different way than what they actually mean, it's going to be difficult to produce something that does what you

Re: odd and even

2018-04-30 Thread Theo van den Heuvel
is or how to use it.) -T -- Theo van den Heuvel Van den Heuvel HLT Consultancy

inheritance and default attributes

2018-04-30 Thread Theo van den Heuvel
sayit() { say $!a } } class AB is A { submethod BUILD(:$!a = 17){} } my $ab = AB.new().sayit; # however. I get "Attribute $!a not declared in class AB", which makes sense. How should I write this instead? Thanks -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: inheritance and default attributes

2018-04-30 Thread Theo van den Heuvel
-- Theo van den Heuvel Van den Heuvel HLT Consultancy

using run

2018-06-20 Thread Theo van den Heuvel
shell for that, but I doubt that is necessary. [On first reading I found the doc confusing because it start with a hairy example. WHy would anyone wish to write to a file named '>foo.txt'? How can that be the first example?] Thanks, -- Theo van den Heuvel

Re: using run

2018-06-20 Thread Theo van den Heuvel
thanks. That helps Jonathan Scott Duff schreef op 2018-06-20 17:50: If you don't specify the :out adverb, then the output of the program you are running will be sent to standard output. Immediately when the program executes. If you specify the :out adverb, output from the program will be

Re: using run

2018-06-21 Thread Theo van den Heuvel
Hi Brad, Ha. Now that is exactly what I was looking for. It felt a bit clumsy having to first collect the material in a string and then print that string. This is nice. Thanks, Theo Brad Gilbert schreef op 2018-06-21 19:47: :out can take an argument ... my $fh = open 'foo.txt',

Parsing with Regexes and Grammars

2018-08-01 Thread Theo van den Heuvel
completely. The publisher keeps his coordinates secret too. Where can I send my remarks? best wishes, -- Theo van den Heuvel

Re: parsing in different modes

2018-08-03 Thread Theo van den Heuvel
den Heuvel Theo van den Heuvel schreef op 2018-08-02 14:58: Hi Laurent, Here I set my example up along the lines of your second suggestion. grammar Sum { token TOP { ^ $ } rule Sum { + % } rule Expr { | { self.incr } '[' ~ ']' { self.decr } } token op { <[-+]> } token nu

Re: parsing in different modes

2018-08-01 Thread Theo van den Heuvel
GMT+02:00 Theo van den Heuvel : Hi Laurent, yes I have, but the mode switching is supposed to happen mid-parsing. I hope to avoid having to interrupt the parse, because picking up after a subparse is going to be hard. I was looking for a way to communicate a change of mode with the action class

Re: parsing in different modes

2018-08-01 Thread Theo van den Heuvel
s "outside parens." Not sure the mechanics of implementing that. -y On Wed, Aug 1, 2018 at 7:41 AM, Theo van den Heuvel wrote: Hi Perl6-people, I am looking for some inspiration. I am working with a grammar that I would like to have operate in two different modes. In both modes the

Re: parsing in different modes

2018-08-01 Thread Theo van den Heuvel
. Thanks, Laurent Rosenfeld schreef op 2018-08-01 19:57: Hi Theo, have you considered using only one grammar but simply calling it with two different actions classes as a parameter depending on the mode you want to use? 2018-08-01 16:41 GMT+02:00 Theo van den Heuvel : Hi Perl6-people, I am looking

parsing in different modes

2018-08-01 Thread Theo van den Heuvel
The presence of the flag is the clue for the actions. This is less than satisfactory because we would have to pass on the parameter to all non-terminals. Can anyone think of a better way to do this? thanks, -- Theo van den Heuvel

Re: parsing in different modes

2018-08-01 Thread Theo van den Heuvel
as needed. This is perhaps slightly cleaner than using a dynamic variable. I hope this helps. Laurent. 2018-08-01 21:21 GMT+02:00 Theo van den Heuvel : Hi Laurent, dynamic variables were my first attempt (see original post). The problem as I see it, but I may well be mistaken, is that I cannot use t

Re: parsing in different modes

2018-08-01 Thread Theo van den Heuvel
m { \d+ } token flag { } } class Act { method num ($/) { say ">>> $/ at nesting level $nest" } } my $input = '2 + 5 + [7 - [3-2] +4] - 8'; Thanks, Theo Theo van den Heuvel schreef op 2018-08-01 21:46: Hi Laurent, I will do some experimenting, because I could be wrong about

Re: parsing in different modes

2018-08-01 Thread Theo van den Heuvel
Hi Laurent, I will do some experimenting, because I could be wrong about the timing thing. A first experiment seems to work. I will post my solution when I am satisfied that it works. thanks, Theo Theo van den Heuvel schreef op 2018-08-01 21:21: Hi Laurent, dynamic variables were my first

Re: parsing in different modes

2018-08-02 Thread Theo van den Heuvel
ightly cleaner than using a dynamic variable. I hope this helps. Laurent. 2018-08-01 21:21 GMT+02:00 Theo van den Heuvel : Hi Laurent, dynamic variables were my first attempt (see original post). The problem as I see it, but I may well be mistaken, is that I cannot use the grammar rule to

curious effects in debugging

2018-08-16 Thread Theo van den Heuvel
expecting any of: infix infix stopper postfix statement end statement modifier statement modifier loop thanks, -- Theo van den Heuvel

Re: parsing in different modes

2018-08-06 Thread Theo van den Heuvel
sorry, false alarm. It does work as advertised. Theo van den Heuvel Theo van den Heuvel schreef op 2018-08-03 22:39: Hi all, My attempt at a solution below does not work. In larger examples the decr gets called before the actions within Sum are processed. Maybe my hunch that this would cause

Re: just curious to know

2020-06-14 Thread Theo van den Heuvel
augments the notion of regular expression that it allows me to make transformations of data that would be very much harder in other languages. Other people will have other motivations, I am sure. good luck, Theo van den Heuvel Radhakrishnan Venkataraman schreef op 2020-06-14 17:04: Hi, I had

Re: subs and the type system

2020-07-20 Thread Theo van den Heuvel
:00: On Mon, 20 Jul 2020, Theo van den Heuvel wrote: Hi gurus, after looking at the documentation on Sub, Signature and the raku type system I find myself unable to constrain the types of functions in the way I think I need. The situation: I have a function, let's call in 'walker', whose fi

subs and the type system

2020-07-20 Thread Theo van den Heuvel
What am I missing here? Thanks, -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: subs and the type system

2020-07-21 Thread Theo van den Heuvel
xpression) at /.../walkable.pl6:21 --> my Walkable $xyzzify = ⏏-> :sgn-walkable { say $d.xyzzy }; I tried to use the scalar sigil instead of the sigilless constant. To no avail. I am hoping for a form that allows me to define Walkables as such. Thanks, Theo van den Heuvel Tobias Boege sch

Re: surprise with start

2021-01-05 Thread Theo van den Heuvel
ing"; sleep; you should also see the "done". On 5 Jan 2021, at 14:15, Theo van den Heuvel wrote: Hi gurus, The first example in the documentation on the start control flow does not seem to work as promised. Here is the code: start { sleep 1; say "done" } say

surprise with start

2021-01-05 Thread Theo van den Heuvel
quot;. Am I missing something? -- Theo van den Heuvel

is there a raku job site?

2021-06-02 Thread Theo van den Heuvel
Hi gurus, I consider hiring a raku consultant, but there does not seem to exist a raku job site. The perl job site seems to implicitly exclude raku jobs. I asked but have not heard back. Any ideas? Could I post the call in this group? thanks, Theo van den Heuvel

dimensions in a multidimensional array

2021-02-05 Thread Theo van den Heuvel
Hi gurus, I cannot seem to find an idiomatic way to get the dimensions of a multidimensional array, other than by looking at the size of the first row and column, with @m[0;*].elems and @m[*;0].elems. Am I missing something in the docs? Thanks, -- Theo van den Heuvel

Re: dimensions in a multidimensional array

2021-02-06 Thread Theo van den Heuvel
Hello Liz, I was indeed talking about the unshaped situation. BTW. I am growing more and more fond of raku, Thanks, Theo Elizabeth Mattijsen schreef op 2021-02-05 16:06: On 5 Feb 2021, at 15:49, Theo van den Heuvel wrote: I cannot seem to find an idiomatic way to get the dimensions