unsubsribe

2016-09-13 Thread Rene Bourgoin via perl6-users

Re: coded size limits on Perl data types?

2016-09-13 Thread Darren Duncan
Thank you for this Timo, and to everyone else who replied. It did indeed address what I wanted to know. -- Darren Duncan On 2016-09-13 5:15 AM, Timo Paulssen wrote: I'll answer based on the data structures MoarVM uses internally: On 09/13/2016 05:13 AM, Darren Duncan wrote:> (Pretend the actu

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

Re: [perl #129256] [BUG] Infinite loop on CArray[].new

2016-09-13 Thread Cédric
Many thanks!

[perl #129262] Endless recursion in --target=parse for subs with more than 1 parameter

2016-09-13 Thread via RT
# New Ticket Created by Siavash # Please include the string: [perl #129262] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129262 > This command doesn't finish running: perl6 --target=parse -e 'sub ($a, $b) {}' but this does

[perl #128123] [JVM] failing test in S03-metaops/hyper.t after change from postfix:<++> to prefix:<++>

2016-09-13 Thread Christian Bartolomaeus via RT
All code examples from above are running fine now. Instead there are four skipped tests in S32-array/adverbs.t which die because the wrong multi postcircumfix:<[ ]> is selected. I'll change the subject of this ticket and leave it open to collect those weird errors about wrong multi candidates u

Re: Fwd: Re: grammars and indentation of input

2016-09-13 Thread Bennett Todd
Well put. The clearest description of Python's approach I've read, explained it as a lexer that tracked indentation level, and inserted appropriate tokens when it changed.

Re: Fwd: Re: grammars and indentation of input

2016-09-13 Thread Aaron Sherman
Oh, a side point: there's some confusion introduced by the lack of a scanner/lexer in modern all-in-one-parsers. Python, for example, uses a scanner and so its grammar is nominally not context sensitive, but its scanner very much is (maintaining a stack of indentation exactly as OP was asking abou

Re: grammars and indentation of input

2016-09-13 Thread Moritz Lenz
Hi, On 13.09.2016 18:55, Patrick R. Michaud wrote: > I don't have an example handy, but I can categorically say that > Perl 6 grammars are designed to support exactly this form of parsing. > It's almost exactly what I did in "pynie" -- a Python implementation > on top of Perl 6. The parsing was d

Re: grammars and indentation of input

2016-09-13 Thread Patrick R. Michaud
I don't have an example handy, but I can categorically say that Perl 6 grammars are designed to support exactly this form of parsing. It's almost exactly what I did in "pynie" -- a Python implementation on top of Perl 6. The parsing was done using a Perl 6 grammar. If I remember correctly, Pynie

Re: Fwd: Re: grammars and indentation of input

2016-09-13 Thread Bennett Todd
Hostile or not, thanks for your informative reply.

Re: Fwd: Re: grammars and indentation of input

2016-09-13 Thread Bennett Todd
Thank you, very much. Yes, I'm disappointed, but I'd rather know.

Re: Fwd: Re: grammars and indentation of input

2016-09-13 Thread Aaron Sherman
> > Having the minutia of the programmatic run-time state of the parse then > influence the parse itself, is at the heart of the perl5 phenomenon "only > Perl can parse perl" I don't mean to be hostile, but you're demonstrably wrong, here. (also it's "only perl can parse Perl" as in, only the "pe

Re: Fwd: Re: grammars and indentation of input

2016-09-13 Thread Patrick R. Michaud
On Tue, Sep 13, 2016 at 10:35:01AM -0400, Bennett Todd wrote: > Having the minutia of the programmatic run-time state of the parse then > influence the parse itself, is at the heart of the perl5 phenomenon "only > Perl can parse perl", which I rather hope isn't going to be preserved in > perl6.

Re: Fwd: Re: grammars and indentation of input

2016-09-13 Thread Theo van den Heuvel
Hi Bennett, There are many situations that require non-contextfree languages. Even though much of these could be solved in the AST-building step (called 'transduction' in my days) instead of the parsing step, that does not solve all cases. I am just wondering if and to what extent we can parse

Re: Fwd: Re: grammars and indentation of input

2016-09-13 Thread Bennett Todd
Having the minutia of the programmatic run-time state of the parse then influence the parse itself, is at the heart of the perl5 phenomenon "only Perl can parse perl", which I rather hope isn't going to be preserved in perl6.

[perl #129266] [PRECOMP] Constants exported from precompiled module don't get updated

2016-09-13 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #129266] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129266 > NOTE: This is fixed in HEAD, but is broken in 2016.08.1-143-gc9b18c6. I'm opening the tic

Fwd: Re: grammars and indentation of input

2016-09-13 Thread Theo van den Heuvel
Thanks Timo and Brian, both examples are educational. However, they have a common limitation in that they both perform their magic after a Match object has been created. I was trying to influence the parsing step itself. I am experimenting to find if I can influence the parsing process progr

Re: grammars and indentation of input

2016-09-13 Thread Aaron Sherman
I don't see why optimization would frustrate this approach. You are doing the correct thing as far as I can tell, but with one exception. The current implementation (last I checked) was sometimes slow in binding values. You might need to force it between an assignment and passing a bound match as a

Re: coded size limits on Perl data types?

2016-09-13 Thread Timo Paulssen
On 09/13/2016 03:12 PM, Timo Paulssen wrote:> If one big integer is allowed to be 14 gigabytes big (if we use the > default of 28 bits per "mp digit"; it's also possible to use 31 or > 60.), we can still safely say "limited only by memory" for now. Something else that makes this pretty difficult i

Re: coded size limits on Perl data types?

2016-09-13 Thread Aaron Sherman
It's also the case that there's no language dependency on any given implementation of larger ints. We could move to a format that, though slower, would support truly arbitrary sized integers in the future, should there become a real need. But I can assure you that such a need isn't likely. Working

Re: [perl #129263] [CONC] Outer dynamic variable not found in nested `start` block

2016-09-13 Thread Elizabeth Mattijsen
Feels to me some kind of loop would need to be made around line 33 in src/core/stubs.pm, basically looping until we either find the dynamic variable, or look for a $*PROMISE in the context and if so, try to find it there? Hope this made sense, too deep in other stuff now to try things out myself

Re: coded size limits on Perl data types?

2016-09-13 Thread Timo Paulssen
On 09/13/2016 02:26 PM, Elizabeth Mattijsen wrote: >> On 13 Sep 2016, at 14:15, Timo Paulssen wrote: >> >> I'll answer based on the data structures MoarVM uses internally: >> >> On 09/13/2016 05:13 AM, Darren Duncan wrote: >> >>> (Pretend the actual hardware has infinite memory so we wouldn't run

Re: grammars and indentation of input

2016-09-13 Thread Brian Duggan
I've also recently been experimenting with parsing an indent-based language -- specifically, a small subset of Slim () -- I push to a stack when I see a tag, and pop based on the depth of the indendation. Here's a working example: https://git.io/vig93 Brian

[perl #129263] [CONC] Outer dynamic variable not found in nested `start` block

2016-09-13 Thread via RT
# New Ticket Created by Sam S. # Please include the string: [perl #129263] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129263 > ➜ my $*a = 42; await start { say $*a } 42 ➜ my $*a = 42; await start { await s

Re: coded size limits on Perl data types?

2016-09-13 Thread Elizabeth Mattijsen
> On 13 Sep 2016, at 14:15, Timo Paulssen wrote: > > I'll answer based on the data structures MoarVM uses internally: > > On 09/13/2016 05:13 AM, Darren Duncan wrote: > > > (Pretend the actual hardware has infinite memory so we wouldn't run > > out of hardware first.) > > > > 1. Maximum size

Re: coded size limits on Perl data types?

2016-09-13 Thread Timo Paulssen
I'll answer based on the data structures MoarVM uses internally: On 09/13/2016 05:13 AM, Darren Duncan wrote:> (Pretend the actual hardware has infinite memory so we wouldn't run > out of hardware first.) > > 1. Maximum size of a (non-machine) integer? We're using libtommath, which declares the "

Re: grammars and indentation of input

2016-09-13 Thread Timo Paulssen
I haven't read your code, but your question immediately made me think of this module: https://github.com/masak/text-indented Would be interested to hear if this helps you! - Timo

grammars and indentation of input

2016-09-13 Thread Theo van den Heuvel
Hi all, I am beginning to appreciate the power of grammars and the Match class. This is truly a major asset within Perl6. I have a question on an edge case. I was hoping to use a grammar for an input that has meaningful indented blocks. I was trying something like this: token element { <.