Re: [ast-users] Edit 10GB file with fixed size records

2013-07-24 Thread Janis Papanagnou
> Does ksh have an API to edit a file at a specific position pos1, read > n1 bytes, and write n1 bytes at that position without truncating the > file? I need this to do edit a file in place without reading and > writing it completely each time. Yes, ksh has seek redirection operators. Here's an a

[ast-users] Edit 10GB file with fixed size records

2013-07-24 Thread Tina Harriott
Does ksh have an API to edit a file at a specific position pos1, read n1 bytes, and write n1 bytes at that position without truncating the file? I need this to do edit a file in place without reading and writing it completely each time. Tina -- Tina Harriott - Women in Mathematics Contact: tina.

Re: [ast-users] Demo code and contrib packages?

2013-07-24 Thread Glenn Fowler
On Wed, 24 Jul 2013 22:15:01 +0200 Tina Harriott wrote: > On 24 July 2013 19:32, Glenn Fowler wrote: > > > > On Wed, 24 Jul 2013 18:52:14 +0200 Tina Harriott wrote: > >> Does ast-ksh have extension packages like "demo" and "contrib" like > >> bash and zsh do? > > > > in ksh user extension are cal

Re: [ast-users] Demo code and contrib packages?

2013-07-24 Thread Tina Harriott
On 24 July 2013 19:32, Glenn Fowler wrote: > > On Wed, 24 Jul 2013 18:52:14 +0200 Tina Harriott wrote: >> Does ast-ksh have extension packages like "demo" and "contrib" like >> bash and zsh do? > > in ksh user extension are called builtins and have an main(argc,argv,context) > api > its described

Re: [ast-users] ACL lists not preserved when copying files with ksh cp

2013-07-24 Thread Glenn Fowler
On Wed, 24 Jul 2013 21:09:12 +0200 Irek Szczesniak wrote: > On Wed, Jul 24, 2013 at 7:46 PM, Glenn Fowler wrote: > > > > On Wed, 24 Jul 2013 18:52:57 +0200 Tina Harriott wrote: > >> On 23 July 2013 20:43, Glenn Fowler wrote: > >> > > >> > On Tue, 23 Jul 2013 19:16:43 +0200 Tina Harriott wrote: >

Re: [ast-users] ACL lists not preserved when copying files with ksh cp

2013-07-24 Thread Glenn Fowler
On Wed, 24 Jul 2013 20:38:54 +0200 Irek Szczesniak wrote: > On Tue, Jul 23, 2013 at 8:43 PM, Glenn Fowler wrote: > > > > On Tue, 23 Jul 2013 19:16:43 +0200 Tina Harriott wrote: > >> I hope this is the right place to report to. On Suse Linux nfs4 ACL > >> lists are not preserved if I copy files wi

Re: [ast-users] _ doesn't refer to the correct object.

2013-07-24 Thread Irek Szczesniak
On Wed, Jul 24, 2013 at 6:08 PM, Cedric Blancher wrote: > On 24 July 2013 18:04, David Korn wrote: >> cc: orm...@gmail.com >> Subject: Re: [ast-users] _ doesn't refer to the correct object. >> >> >>> In this type, I can't think of any way to refer to "obj" from within >>> "x.get". >>>

Re: [ast-users] ACL lists not preserved when copying files with ksh cp

2013-07-24 Thread Irek Szczesniak
On Wed, Jul 24, 2013 at 7:46 PM, Glenn Fowler wrote: > > On Wed, 24 Jul 2013 18:52:57 +0200 Tina Harriott wrote: >> On 23 July 2013 20:43, Glenn Fowler wrote: >> > >> > On Tue, 23 Jul 2013 19:16:43 +0200 Tina Harriott wrote: >> >> I hope this is the right place to report to. On Suse Linux nfs4 AC

Re: [ast-users] ACL lists not preserved when copying files with ksh cp

2013-07-24 Thread Irek Szczesniak
On Tue, Jul 23, 2013 at 8:43 PM, Glenn Fowler wrote: > > On Tue, 23 Jul 2013 19:16:43 +0200 Tina Harriott wrote: >> I hope this is the right place to report to. On Suse Linux nfs4 ACL >> lists are not preserved if I copy files with ksh's builtin cp command. > >> To demonstrate: >> 1. touch aaa > >

Re: [ast-users] ACL lists not preserved when copying files with ksh cp

2013-07-24 Thread Glenn Fowler
On Wed, 24 Jul 2013 18:52:57 +0200 Tina Harriott wrote: > On 23 July 2013 20:43, Glenn Fowler wrote: > > > > On Tue, 23 Jul 2013 19:16:43 +0200 Tina Harriott wrote: > >> I hope this is the right place to report to. On Suse Linux nfs4 ACL > >> lists are not preserved if I copy files with ksh's bui

Re: [ast-users] Demo code and contrib packages?

2013-07-24 Thread Glenn Fowler
On Wed, 24 Jul 2013 18:52:14 +0200 Tina Harriott wrote: > Does ast-ksh have extension packages like "demo" and "contrib" like > bash and zsh do? in ksh user extension are called builtins and have an main(argc,argv,context) api its described in the nav bar at http://www.research.att.com/s

Re: [ast-users] Unit of least precision (ULP)/spacing between floating point number problems

2013-07-24 Thread Glenn Fowler
On Wed, 24 Jul 2013 19:02:39 +0200 Tina Harriott wrote: > Here's one of my little tough problems which I am unable to solve > myself, even after looking at the source code of ast-ksh. The problem > below requires a good understanding how floating point numbers are > implemented in computers. > I'

[ast-users] Unit of least precision (ULP)/spacing between floating point number problems

2013-07-24 Thread Tina Harriott
Here's one of my little tough problems which I am unable to solve myself, even after looking at the source code of ast-ksh. The problem below requires a good understanding how floating point numbers are implemented in computers. I'm trying to prototype code and like to iterate over a small, linear

[ast-users] Demo code and contrib packages?

2013-07-24 Thread Tina Harriott
Does ast-ksh have extension packages like "demo" and "contrib" like bash and zsh do? Tina -- Tina Harriott - Women in Mathematics Contact: tina.harriott.mathemat...@gmail.com ___ ast-users mailing list ast-users@lists.research.att.com http://lists.rese

Re: [ast-users] ACL lists not preserved when copying files with ksh cp

2013-07-24 Thread Tina Harriott
On 23 July 2013 20:43, Glenn Fowler wrote: > > On Tue, 23 Jul 2013 19:16:43 +0200 Tina Harriott wrote: >> I hope this is the right place to report to. On Suse Linux nfs4 ACL >> lists are not preserved if I copy files with ksh's builtin cp command. > >> To demonstrate: >> 1. touch aaa > >> 2. nfs4_

Re: [ast-users] _ doesn't refer to the correct object.

2013-07-24 Thread David Korn
cc: ast-users@lists.research.att.com orm...@gmail.com Subject: Re: Re: [ast-users] _ doesn't refer to the correct object. > What happens if "x" itself is a typed variable? What does python do? I don't know what python does. What I did for ksh was to have _ reference x when x is a typ

Re: [ast-users] _ doesn't refer to the correct object.

2013-07-24 Thread Cedric Blancher
On 24 July 2013 18:04, David Korn wrote: > cc: orm...@gmail.com > Subject: Re: [ast-users] _ doesn't refer to the correct object. > > >> In this type, I can't think of any way to refer to "obj" from within "x.get". >> _ should point to "obj" in this context, not "obj.x". >> >> #!/usr

Re: [ast-users] _ doesn't refer to the correct object.

2013-07-24 Thread Cedric Blancher
On 24 July 2013 18:04, David Korn wrote: > cc: orm...@gmail.com > Subject: Re: [ast-users] _ doesn't refer to the correct object. > > >> In this type, I can't think of any way to refer to "obj" from within "x.get". >> _ should point to "obj" in this context, not "obj.x". >> >> #!/usr

Re: [ast-users] _ doesn't refer to the correct object.

2013-07-24 Thread David Korn
cc: orm...@gmail.com Subject: Re: [ast-users] _ doesn't refer to the correct object. > In this type, I can't think of any way to refer to "obj" from within "x.get". > _ should point to "obj" in this context, not "obj.x". > > #!/usr/bin/env ksh > > typeset -T Type=( >

Re: [ast-users] Regression in += operator

2013-07-24 Thread David Korn
cc: orm...@gmail.com Subject: Re: Re: [ast-users] Regression in += operator > It's intentional. It's valid to export this to a command's environment. It > works > in zsh, bash (git), and has worked previously at some point in ksh93. > It worked in ksh93u but it was leaving side effe