suggestions for tracking down memory leaks

2023-03-23 Thread Nathan Gray
I have a program that I intend to run for days or weeks at a time, but it is being killed by the OS after a day or so, I think because it is using up too much memory (growing over time). I would like to be able to debug the memory leak and find out where it is happening, so I can fix it. What tool

Re: concurrency of asynchronous events - input from multiple keyboards

2021-01-02 Thread Nathan Gray
On Fri, Jan 01, 2021 at 03:20:09PM -0500, Vadim Belman wrote: > As it seems that Audio::PortMIDI lacks non-blocking interface, I think a > solution would be to read events in a dedicated thread and re-submit them > into a Supplier. Something like: > > my Supplier $midi-events; > > start { >

concurrency of asynchronous events - input from multiple keyboards

2021-01-01 Thread Nathan Gray
I am working on a small virtual organ program, where I have multiple MIDI controller keyboards which can be connected to one or more synthesizer channels to emit various sounds simultaneously. At this point, I am able to read events from a single MIDI controller and send the events to the correct

Re: generating grammars, capturing in regex interpolation, etc.

2015-04-20 Thread Nathan Gray
> Am 17.04.2015 um 04:34 schrieb Nathan Gray: > > # Call it if it is a routine. This will capture if requested. > > return (var)(self) if nqp::istype(var,Callable); > > > > This seems to indicate that captures in the embedded regexes > > should capture. O

Re: generating grammars, capturing in regex interpolation, etc.

2015-04-16 Thread Nathan Gray
On Wed, Apr 15, 2015 at 09:45:39PM -0400, Nathan Gray wrote: > I had given up on using regexes embedded within regexes, because > I could not get capturing to work. I did a backtrace on one of the test cases that fails, which led me to src/core/Cursor.pm in method INTERPOLATE(\var,

Re: generating grammars, capturing in regex interpolation, etc.

2015-04-15 Thread Nathan Gray
On Tue, Apr 14, 2015 at 08:58:29PM -0500, Patrick R. Michaud wrote: > Just an idea: instead of building strings to be interpolated into > a regex, could you just build regexes directly? > > my $pattern = rx/$=[hello]/; > my $match = "hello" ~~ / /; > > The resulting string is captured i

generating grammars, capturing in regex interpolation, etc.

2015-04-14 Thread Nathan Gray
I've been playing in Perl 6 (after several years of absence). I am very impressed. I'm porting my recent Date::Reformat into Perl 6, for fun, to get me back into the Perl 6 headspace, and possibly to help others, either with something useful, or something they can look to for examples. I've run

Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk

2009-09-16 Thread Nathan Gray
On Mon, Sep 14, 2009 at 12:15:05PM +0100, Tim Bunce wrote: > You can find my current draft at http://files.me.com/tim.bunce/65oikg (2.3MB > PDF) page 73 - Haskell should be spelled with two Ls -kolibrie

Re: [perl #55566] [BUG] Configure.pl dies on gnu/hurd

2008-06-16 Thread Nathan Gray
On Tue, Jun 10, 2008 at 06:44:53PM -0700, James Keenan via RT wrote: > Please try the attached patch. After applying the patch, I would > suggest the following to test it thoroughly: > > perl Configure.pl > > ... then: > > perl Configure.pl --nomanicheck --verbose-step=init::hints > >

Re: [perl #55566] [BUG] Configure.pl dies on gnu/hurd

2008-06-12 Thread Nathan Gray
Finally 'make test' finished. I stalled several times and I killed processes that seemed like likely candidates. Several, if not all of the failures can be attributed to those manual kills. Failed Test Stat Wstat Total Fail List of Failed

Re: [perl #55566] [BUG] Configure.pl dies on gnu/hurd

2008-06-11 Thread Nathan Gray
On Tue, Jun 10, 2008 at 06:00:39AM -0700, Will Coleda via RT wrote: > Your workaround, btw, is probably: > > touch config/init/hints/hurd.pm That actually complained about a non-true value. The correct incantation turned out to be: echo '1;' > config/init/hints/gnu.pm The Configure.pl step

Re: [perl #55566] [BUG] Configure.pl dies on gnu/hurd

2008-06-11 Thread Nathan Gray
On Tue, Jun 10, 2008 at 06:00:39AM -0700, Will Coleda via RT wrote: > Interesting. I tried to duplicate this error by removing my platform's > hints file and re-running. I get the message you describe, but then > Configure.pl completes, and at the -end-, gracefully says: > > During configuration t

parrot init/hints for the Hurd

2008-06-10 Thread Nathan Gray
I tried compiling parrot on the Hurd, but Configure.pl complained: Checking MANIFEST.done. Setting up Configure's default values.done. Tweaking settings for miniparrot...skipped. Loa

Re: Perl 6 Microgrants. Now accepting proposals.

2007-03-22 Thread Nathan Gray
On Thu, Mar 22, 2007 at 01:24:58PM +, Tim Bunce wrote: > Here's a related idea: write a tool that reads BNF grammar, such as > http://java.sun.com/docs/books/jls/third_edition/html/syntax.html > http://java.sun.com/docs/books/jls/third_edition/html/grammars.html > and writes a parser in Perl 6

Re: Capture sigil

2006-09-20 Thread Nathan Gray
On Wed, Sep 20, 2006 at 12:28:10PM -0700, Larry Wall wrote: > Bikeshed: What should that sigil be? And if it's in Latin-1, what's the > ASCII workaround? The one that springs out to me is: > ¤ 00A4CURRENCY SIGN Probably because it looks like a container with something cap

Re: Heredoc issue in pugs.

2006-08-22 Thread Nathan Gray
On Wed, Aug 23, 2006 at 02:16:11AM +0800, Yiyi Hu wrote: > #!/usr/bin/env pugs > > my $a = q:t /END/ > test > END; > > $a.perl.say; > > Above example works ok in pugs, But the problem is. > From S02 > > Heredocs are no longer written with <<, but with an adverb on any > other quote construct: >

Re: a smarter form of whitespace

2006-07-06 Thread Nathan Gray
On Tue, Jul 04, 2006 at 12:57:16PM -0700, Allison Randal wrote: > I'm writing a parser for a language that treats a double newline as a > statement terminator. It works if I make every rule a 'regex' (to turn > off smart whitespace). But I want spaces and tabs to act as smart > whitespace, and newl

Re: Flunking tests and failing code

2005-12-05 Thread Nathan Gray
On Mon, Dec 05, 2005 at 07:54:25AM +, Luke Palmer wrote: > I wonder if there is a macroey thing that we can do here. That is, > could we make: > > ok(1); > is(1, 1); > like("foo", /foo/); > > Into: > > ok(1); > ok(1 == 1); > ok("foo" ~~ /foo/); > > And lexically ana

Re: The meaning of \n and \N in rules

2005-11-04 Thread Nathan Gray
On Fri, Nov 04, 2005 at 09:53:07AM -0600, Patrick R. Michaud wrote: > I'm of the opinion that the sequence "\015\012" should always > be treated as a single newline, in which case the last > expression above would not match because the target string contains > only two newlines. But I want to chec

Re: Standard library for perl6? (graphical primitives)

2005-10-18 Thread Nathan Gray
On Sat, Oct 15, 2005 at 08:33:26AM +0300, Markus Laire wrote: > Could it be possible to create a "Standard library" for perl6, which > would also include graphical primitives (putpixel, getpixel, > getcolordepth, putimage, getimage, copyrectangle)? I'm interested in creating a perl6 binding to c

Re: Stringification, numification, and booleanification of pairs

2005-09-23 Thread Nathan Gray
On Thu, Sep 22, 2005 at 11:59:32AM -0400, Matt Fowles wrote: > Well said! I completely agree that string interpolation should be > handled exactly the same as stringification. I would like C< ("foo is > $foo of course") eq ("foo is " ~ $foo ~ " of course") > at all times. Yes. S03 states: Un

Re: Object Model Pictures

2005-09-21 Thread Nathan Gray
On Tue, Sep 20, 2005 at 08:16:23PM -0400, Stevan Little wrote: > http://svn.openfoundry.org/pugs/perl5/Perl6-MetaModel2.0/docs/ > p6_role_model.jpg > > I am planning on making Roles self-bootstrapping, so the class(Role) > will actually be the first Role in the system. From there, Class will

Re: Object Model Pictures

2005-09-12 Thread Nathan Gray
On Mon, Sep 12, 2005 at 03:10:55PM -0400, Stevan Little wrote: > In my never ending quest to implement the Perl 6 object model, I have > started drawing pictures. Here is the latest version: > > http://svn.openfoundry.org/pugs/perl5/Perl6-MetaModel2.0/docs/ > p6_object_model.jpg Awesome diagra

MetaModel notes

2005-08-11 Thread Nathan Gray
My notes to myself as I read the 2005-08-04 IRC discussion of the MetaModel: http://colabti.de/irclogger/irclogger_log/perl6?date=2005-08-04,Thu&sel=356#l564 Clarification, corrections, and questions welcome. Master document at http://svn.openfoundry.org/pugs/perl5/Perl6-MetaModel/docs/20_00

Re: Container model - pictures and questions

2005-08-06 Thread Nathan Gray
On Sun, Aug 07, 2005 at 12:55:53AM +0800, Autrijus Tang wrote: > Hm, I'm afraid there are not much material on this beyond the Synopses, > so I'll try to describe that picture a bit. > ... > > That's about it. :-) Hopefully my two questions will make more sense > to you now... Very nice descript

Re: parsing perl6 grammars

2005-07-20 Thread Nathan Gray
On Wed, Jul 20, 2005 at 07:08:20AM -0400, Jeff 'japhy' Pinyan wrote: > http://feather.perl6.nl/~japhy/ has R-P-0.20 with the current state of the > Perl6::Rule::Parser code. Awesome, I'll take a look. -kolibrie

parsing perl6 grammars

2005-07-19 Thread Nathan Gray
Jeff, Autrijus Tang suggested to me that you had at one time started work on a parser for perl6 rules. What is the state of that project? May others help? -kolibrie

Re: parsing perl6 grammars

2005-07-19 Thread Nathan Gray
On Tue, Jul 19, 2005 at 03:01:03PM -0400, Jeff 'japhy' Pinyan wrote: > On Jul 19, Nathan Gray said: > > >May others help? > > Most likely. I haven't CVS'd it yet (or whatever it is they're using on > feather.perl6.nl), but I suppose I should if mul

Re: Perl 6 Modules

2005-07-15 Thread Nathan Gray
On Fri, Jul 15, 2005 at 09:54:57PM +0800, Gav wrote: > Being a relative newcomer to all that is Perl 6, can someone tell me what > differences > I need to know in order to write/amend Perl 6 extension Modules as opposed > to > Perl 5 versions ? A good starting place is: http://svn.openfou

Re: WTF? - Re: method calls on $self

2005-07-14 Thread Nathan Gray
On Fri, Jul 15, 2005 at 01:09:57AM +0300, Yuval Kogman wrote: > On Thu, Jul 14, 2005 at 13:39:44 -0700, Larry Wall wrote: > > On Thu, Jul 14, 2005 at 12:55:26PM -0400, Nathan Gray wrote: > > : So long as .foo (pretty please) means $_.foo all the time (with sugar on > > : top

Re: WTF? - Re: method calls on $self

2005-07-14 Thread Nathan Gray
On Thu, Jul 14, 2005 at 05:37:38PM +0200, Carl Mäsak wrote: > On 7/14/05, Juerd <[EMAIL PROTECTED]> wrote: > > It's just a Solomon judgement situation. That can work out well, but I > > really hate when it's forced and used to test patience. > > If Juerd is right about this being a solomonian situ

Re: date and time formatting

2005-06-01 Thread Nathan Gray
On Wed, Jun 01, 2005 at 03:42:57PM +1200, Sam Vilain wrote: > I've made a start on this. See ext/Date in pugs. I don't think that > your views are necessarily contrary. That's what I'm looking for. Thank you! > The biggest reason I didn't use DateTime was that I found it awkward > for the comm

date and time formatting

2005-05-31 Thread Nathan Gray
As I am interested in human-readable dates and times, and having found no conclusive discussion on time formatting, I make my recommendation for a syntax (to start discussion, and allow for date formatting to be implemented in pugs): I would like for time() to return an object, which in numeric co

Re: Perl development server

2005-05-24 Thread Nathan Gray
On Mon, May 23, 2005 at 05:18:45PM +0200, Juerd wrote: > Everyone who wants, can get a login. Access is provided via SSH version > 2 only (Windows users can use PuTTY and WinSCP), and the box may be used > for everything that improves Perl 6 development. Users are encouraged to > keep files world r

Re: Perl development server

2005-05-24 Thread Nathan Gray
On Mon, May 23, 2005 at 06:51:31PM +0200, Juerd wrote: > Nathan Gray skribis 2005-05-23 12:50 (-0400): > > > >Sorry, but 'dev' isn't cute enough :). And it's going to be > > > >something.perl6.nl, probably. I don't mind aliases, though, but they

Re: Perl development server

2005-05-23 Thread Nathan Gray
On Mon, May 23, 2005 at 06:51:31PM +0200, Juerd wrote: > Nathan Gray skribis 2005-05-23 12:50 (-0400): > > > >Sorry, but 'dev' isn't cute enough :). And it's going to be > > > >something.perl6.nl, probably. I don't mind aliases, though, but they

Re: Perl development server

2005-05-23 Thread Nathan Gray
On Mon, May 23, 2005 at 12:00:14PM -0400, Stevan Little wrote: > On May 23, 2005, at 11:25 AM, Juerd wrote: > >>dev.pugscode.org seems indicated ... > > > >Sorry, but 'dev' isn't cute enough :). And it's going to be > >something.perl6.nl, probably. I don't mind aliases, though, but they > >better b

Re: Graphing tool for PerlGuts Illustrated

2005-05-21 Thread Nathan Gray
On Sat, May 21, 2005 at 12:29:58AM +0300, 'Yuval Kogman' wrote: > On Fri, May 20, 2005 at 14:20:04 -0700, Jan Dubois wrote: > > > > IIRC(AIDRC), he hand-hacked postscript files for those diagrams :P > > > > After drawing them with a pen on graphing paper first to get the > > coordinates right. T

Re: Pugs 6.2.3 released!

2005-05-17 Thread Nathan Gray
On Tue, May 17, 2005 at 08:21:33AM -0700, [EMAIL PROTECTED] wrote: > 1) Do you need parrot to install PUGS 6.2.3 on windows, or is parrot > optional? I believe parrot is still optional (at least, you can compile without embedded parrot). > 2) I mainly want to play with perl 6 rules. If someone c

Re: Yet Another TODO Model for Test.pm

2005-05-04 Thread Nathan Gray
On Tue, May 03, 2005 at 01:37:43PM -0400, Stevan Little wrote: > On May 3, 2005, at 12:32 PM, Nathan Gray wrote: > >Can you put the definitions of each attribute in one of the README > >files? > > I will put these common ones in there yes. However, the nice aspect of >

Re: Yet Another TODO Model for Test.pm

2005-05-03 Thread Nathan Gray
On Tue, May 03, 2005 at 10:36:40AM -0400, Stevan Little wrote: > The ongoing search to find a good model for TODO tests in Pugs > continues ... > > To start with, the idea of some kind of "switch" to turn all failures > into TODOs has been removed. It was a bad idea from the start and since > i

Re: Test.pm & t/force_todo refactoring idea

2005-04-22 Thread Nathan Gray
On Thu, Apr 21, 2005 at 02:24:29PM -0400, Stevan Little wrote: > On Apr 21, 2005, at 12:00 PM, Nathan Gray wrote: > >I don't quite understand the global/env variable idea. Can you explain > >that in more detail? > > It could be something as simple as this: > > %

Re: Test.pm & t/force_todo refactoring idea

2005-04-21 Thread Nathan Gray
On Thu, Apr 21, 2005 at 11:17:11AM -0400, Stevan Little wrote: > Although after some discussion with nothingmuch on IRC, I think I have > come to good compromise. > > We remove all the todo_ functions, and we add a named param "todo" to > all our test functions. This would allow test level TODO-

Re: [pugs]weird thing with say ++$

2005-04-21 Thread Nathan Gray
On Thu, Apr 21, 2005 at 11:45:27AM +0200, Paul Johnson wrote: > On Thu, Apr 21, 2005 at 04:32:41PM +0800, fayland wrote: > > > It has been published at perl6.language, but have no reply. > > > > In perl v5.8.6 built for MSWin32-x86-multi-thread: > > > > my $i = 1; > > print $i++, ++$i; # 1 3 > >

Re: Test.pm & t/force_todo refactoring idea

2005-04-21 Thread Nathan Gray
On Wed, Apr 20, 2005 at 11:30:09PM -0400, Stevan Little wrote: > It would also allow for code like this: > > force_todo(1, 5, 10 .. 15, 25); > > Which (IMHO) is nicer than having to do this in the t/force_todo file: > > t/my_test.t 1 5 10 11 12 13 14 15 25 > > I also think that havi

Re: pugs CGI.pm

2005-04-13 Thread Nathan Gray
On Wed, Apr 13, 2005 at 09:52:41AM -0400, Stevan Little wrote: > On Apr 13, 2005, at 9:20 AM, BÁRTHÁZI András wrote: > >As Pugs works in UTF-8, my page is coded in UTF-8, too (and there are > >some other reasons, too). When I try to send an accented charater to > >the server as parameter, for exa

Re: array of arrays, hash of hashes, elems, last

2005-04-08 Thread Nathan Gray
On Wed, Apr 06, 2005 at 09:52:40PM -0400, Lev Selector wrote: > But I can't make Arrays of Arrays or Hash of Hashes work. > @ar.elems & @ar.last don't work either. Autrijus' journal entry (http://use.perl.org/~autrijus/journal/) from Wednesday states one of the goals for this week is: * Impleme

YAML test output

2005-03-25 Thread Nathan Gray
I was wondering if I should switch my test log output to YAML, or some more parseable format. Or maybe change output format based on the log file extension? The problem, of course, is not to encumber Test.pm with anything heavy, and no extra dependencies. Any thoughts, especially from Stevan et

Makefile environment variables for testing

2005-03-17 Thread Nathan Gray
As I was thinking about how to turn on test file logging, I thought it might be nice to set a flag in Makefile.PL that would, perhaps, set an environment variable while tests are run. Then the default value of $Test::log_file could be %ENV{'TEST_LOG_FILE'} instead of ''. That way, it would be ver

Re: test logging

2005-03-17 Thread Nathan Gray
On Wed, Mar 16, 2005 at 08:32:48AM -0500, Stevan Little wrote: > > On Mar 15, 2005, at 1:23 PM, Nathan Gray wrote: > >Is there a place for Test.pm from perl5 in the perl6 world? That's the > >one I want to use. > > You are certainly free to write it, and I think it

Re: test logging

2005-03-16 Thread Nathan Gray
Is there a place for Test.pm from perl5 in the perl6 world? That's the one I want to use. -kolibrie

Re: test logging

2005-03-15 Thread Nathan Gray
On Tue, Mar 15, 2005 at 08:27:32AM -0500, Stevan Little wrote: > On Mar 15, 2005, at 6:45 AM, Nathan Gray wrote: > >I also think it would be very nice to be able to use other operators, > >such as gt, lt, or isa. > > > > is($got, $expected, $desc, operator => &#x

test logging

2005-03-15 Thread Nathan Gray
I think it would be really nice for failed, todo, and skipped tests to log their $expected and $got values, with any $desc or $context information to a log file (probably test.log). I also think it would be very nice to be able to use other operators, such as gt, lt, or isa. is($got, $expected,

Re: named subroutine parameters

2005-03-15 Thread Nathan Gray
Thank you Luke and Autrijus, and Jesse Vincent for the test case. -kolibrie On Mon, Mar 14, 2005 at 11:29:58PM +0800, Autrijus Tang wrote: > On Mon, Mar 14, 2005 at 10:15:25AM -0500, Nathan Gray wrote: > > But unfortunately, this did not: > > pugs> sub formalize($text, +

named subroutine parameters

2005-03-14 Thread Nathan Gray
I tried using named parameters (S06) and found this to work: pugs> sub formalize($text, +$case) { say $text } formalize('hello'); hello bool::true But unfortunately, this did not: pugs> sub formalize($text, +$case) { say $text } formalize('hello', case=>'upper'); *** Error: unexpect