in reply to a look at Sub::Genius with the debugger, and use v in 2021
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: a look at Sub::Genius with the debugger, and use v in 2021
by Aldebaran (Curate) on Jun 25, 2021 at 21:31 UTC | |
Hi Brett, Welcome to the monastery. I hope your friendly presence makes it feel less cloistered here. I've taken the opportunity to look and listen to your presentations, and I'm so glad that you took the time you needed to get through the initial arc of it. I've been in conversations with people who do representations that take 1, 3, 6 hours, and you seem to be of this variety, ideas coming out of your ideas like the florets of a cauliflower("...and in the infinite case....") You should know that I'm only intermediate as a practioner of perl, despite having been at it for a while now. I have some pretty grandiose ideas of where this software could take us, but it would have to be an "us" thing. By that I mean, you, me, and others would have to get their paws on this if it's gonna realize its goal. One might think that there's fewer perl practioners to help with anything, but what if it offered the carrot of not having bad forks nor race conditions, provided that the user doesn't embellish and add them? The last perl script I wrote with fork was equal amounts hideous and faulty. I've worked through several examples. The five older ones are solid, but the last 3 pi ones need some more spitshine. My theory is that you wrote over your previous work. Let's take a look at the second one first. I will list source, output from stdout, source text from debugger, then debugger output:
Stdout has:
This is my debugger source text, 3.scope.txt:
Debug output:
The truth is that I don't get what goes wrong here, but I think I've framed where it happens. The scoping is hard for me to get my head around, but is it not the implementation of an AST? I could take you through the first one in a similar way, but again, I think it got overwritten, so fix 2 then fix 1 makes sense in such a scenario to me. The third is tantalizing, but we seem to have some inflation there:
Have you read Borwein and Borwein re pi calculations? (A classic.) Worth the interlibrary loan if you haven't. Anyways, I'm gonna get this posted hoping that the surfeit of brilliant perl programmers who suddenly have more time on the their hands than usual can pick up where I tap out. Also, I've seen how you attack a keyboard, and monastery markup might be tedious from scratch. This is what I use as a template for posts: Read more... (3 kB)
Edit: Removed the use of an earlier version and redundant use warnings in a subroutine.
Have a great day. I like scripting in the AC when the alternative is an unforgiving sun.... | [reply] [d/l] [select] |
by oodler (Acolyte) on Jun 28, 2021 at 11:31 UTC | |
The truth is that I don't get what goes wrong here, but I think I've framed where it happens. The scoping is hard for me to get my head around, but is it not the implementation of an AST? The AST is only relevant when it comes to the construction of the DFA that is ultimately used to produce a single valid line of execution. Sub::Genius just takes what FLAT is able to generate as a string derived from the PRE (by way of an equivalent DFA). Are you trying to figure out how to go from the PRE to the DFA? An AST is involved in the conversion from the PRE to the PFA, but after that it is not involved at all. Thank you for the pointer to the work of the Borweins, I am not a math guy but do enjoy reading about the subject and interesting people around it. Numerical errors notwithstanding, here are some suggestions that I think can help: Regarding perl's memory model, you may program all subroutines assuming that they can access:
Hope that helps! Feel free to send me links to some stuff you've played with here - obviously, PM is not ideal for really swapping code. :-) | [reply] [d/l] [select] |
by Aldebaran (Curate) on Jun 26, 2021 at 23:44 UTC | |
I have enough time on a hades hot afternoon to do a lazy write-up for the first pi script from examples for Sub::Genius, that, on my terminal, is tripped up at run_any which calls run_once . I think this frames the issue:
Even with the number of threads bumped to 6, it goes no farther. I must say I'm puzzled, because I do not see how this source differs from what Brett shows to compile and behave on his screen at the one hour mark of his second youtube presentation. | [reply] [d/l] |