Re: RFC 61 (v2) Interfaces for linking C objects into pe

2000-08-08 Thread David L. Nicol
Hildo Biersma quoted RFC 62 and then went on thusly: CXS is an excellent medium for sharing the glory of the internals of Perl with the C programming community. It is hoped that the interface deescribed herein will become an excellent medium for sharing the glory of the internals of

http://dev.perl.org/rfc/37.pod

2000-08-08 Thread David L. Nicol
http://dev.perl.org/rfc/37.pod And if we adopt complex data structures (how complex? just wrappers for C structs, into very fast hashes) as suggested in rfc 61, we could return those special, limited pseudohashes with only the relevant names, resolvable into offsets at compile time, instead of

selectively invalidating cached inherited methods (as Re: Method call optimiza

2000-08-11 Thread David L. Nicol
Dan Sugalski wrote: not work. I think we're going to have to have a doubly-linked list going for @ISA, so when a parent package changes the child packages get changed too. It'll make updates to @ISA more expensive, but if you do that then you ought to be prepared to take a hit.

Re: re rfc 15 typing

2000-08-10 Thread David L. Nicol
Michael Fowler wrote: Which then raises a few more problems (whew): how do you coax user input (which is an SV) into a value $foo can accept with very-strict on? You run it through an explicit conversion process, like using Catoi() in a C program Unfortunately, this involves more

string types proposal

2000-08-15 Thread David L. Nicol
Larry Wall wrote: By the way, don't take this as a final design of string types either. :-) If string types are a tree of partially full nodes of string data, the representation of each sNode could be independent of the others. The originial idea behind using partially full nodes is, you

Re: RFC 83 (v2) Make constants look like variables

2000-08-17 Thread David L. Nicol
internally, how to do it: ASSIGNMENT, as in, Change-my-values-w/o-changing-my-type, is in the vtable for the object. When an object becomes constant, its ASSIGNMENT function gets replaced with $heres_what_it_gets_replaced_with=sub{ throw

Re: RFC 130 (v1) Transaction-enabled variables for Perl6

2000-08-17 Thread David L. Nicol
I wrote a transaction-enabled database in perl 5, using fork() for my multithreading and flock() for my mutexes. It continues to work just fine. Threading gives us mutexes. Are you just saying that every variable should have its own mutex, and perl's = assignment operator should implicitly

incorporate VMS into perl entirely

2000-08-17 Thread David L. Nicol
512 byte pages, stored on a permanent device and paged in as required, for everything -- David Nicol 816.235.1187 [EMAIL PROTECTED] Does despair.com sell a discordian calendar?

Re: Vtable speed worry

2000-08-18 Thread David L. Nicol
No, because each table lookup takes less time than comparing one letter of a text string. sv-vtable-svpvx; Isn't this going to really, really hurt? -- David Nicol 816.235.1187 [EMAIL PROTECTED] Does despair.com sell a discordian

extremely general top level threaded loop

2000-08-23 Thread David L. Nicol
John Porter wrote: "All flow control will implemented as longjumps." -- John Porter # language description has a lot to do. # this is a general, threaded, top-level loop. # a no-brainer. $rearrange = sub{ # so this can be redefinied my $i, $t, $n; for (my $i = 0;

Re: RFC 146 (v1) Remove socket functions from core

2000-08-25 Thread David L. Nicol
Nathan Torkington wrote: moving getprotobyname() to a module isn't the same as moving open(). And it can be transparent, if it isn't already. Why does perl need to be monolithic? I thought I selcted to build as shared libraries, splitting that into several shared libraries might be

multidim. containers

2000-08-25 Thread David L. Nicol
You can make multidimensional containers in perl5 by settling on a syntax for combining all the dimensions into a key value and using that as the key in a hash. If arrays as we know them implement by using a key space restricted to integers, I think a reasonable way to get matrices would be to

Re: Structuring perl's guts (Or: If a function is removed from aninterpreter, but you can still use it transparently, is it reallygone?)

2000-08-25 Thread David L. Nicol
Dan Sugalski wrote: If it's decreed that fork is just there without having to do something special, then it will be no matter what magic needs to be done. package refimpl::builtins; sub fork { $refimpl::threads::deepcopy_target = new

Re: Why except and always should be a seperate RFC.

2000-08-25 Thread David L. Nicol
perl5 sort of already has an Calways, in that DESTROY() methods are called on any blessed lexicals when the scope closes. Taking advantage of that for closing a file works if you hide your files in an object class or equivalent chicanery. Allowing user code into the list of things that perl

Re: RFC 143 (v1) Case ignoring eq and cmp operators

2000-08-25 Thread David L. Nicol
e used very recently, or something like that. This Nathan Torkington wrote: David L. Nicol writes: If we use exceptions of some kind to handle syntax, encountering an exception of type "unknown-keyword:Cmp" could result in the subroutine definition getting run to clarify this p

Re: RFC 155 - Remove geometric functions from core

2000-08-29 Thread David L. Nicol
Well then. It is impossible to rearchitect it to make it shared text? Perhaps the first instance of perl sets up some vast shared memory segments and a way for the newcomers to link in to it and look at the modules that have been loaded, somewhere on this system, and use the common copy?

Re: RFC 155 - Remove geometric functions from core

2000-08-29 Thread David L. Nicol
Sam Tregar wrote: On Tue, 29 Aug 2000, David L. Nicol wrote: Well then. It is impossible to rearchitect it to make it shared text? Perhaps the first instance of perl sets up some vast shared memory segments and a way for the newcomers to link in to it and look at the modules

Re: RFC 146 (v1) Remove socket functions from core

2000-08-29 Thread David L. Nicol
Nick Ing-Simmons wrote: We need to distinguish "module", "overlay", "loadable", ... if we are going to get into this type of discussion. Here is my 2ยข: Module - separately distributable Perl and/or C code. (e.g. Tk800.022.tar.gz) Loadable - OS loadable binary e.g. Tk.so or Tk.dll

Re: RFC 146 (v1) Remove socket functions from core

2000-08-30 Thread David L. Nicol
Dan Sugalski wrote: Oh, and then they will be unloaded if we need the space for something else. I understand now, thanks. Well, probably not, though that could be reasonable for a particular platform. It's only relevant for a persistent interpreter anyway--for ones fired up fresh it

Re: the C JIT

2000-08-31 Thread David L. Nicol
Ken Fox wrote: Trolling? No, I'm not, it's the direction that RFC 61 ends up if you let it take you there. fast perl6 becomes, as well as slicing, dicing and scratching your back, a drop-in replacement for gcc. -- David Nicol 816.235.1187 [EMAIL PROTECTED]

Re: A tentative list of vtable functions

2000-08-31 Thread David L. Nicol
Dan Sugalski wrote: Okay, here's a list of functions I think should go into variable vtables. All the math functions are in here. Can the entries that my type does not use be replaced with other functions that my type does use? Functions marked with a * will take an optional type offset

Re: the C JIT

2000-08-31 Thread David L. Nicol
Ken Fox wrote: . The real problems of exception handling, closures, dynamic scoping, etc. are just not possible to solve using simple C code. - Ken I'm not talking about translating perl to C code, I'm talking about translating perl to machine language. C is babytalk compared to Perl,

Re: A tentative list of vtable functions

2000-09-01 Thread David L. Nicol
Dan Sugalski wrote: We're shooting for speed here. Any common operation that could be affected by the type of the variable should be represented so a custom function can be called that does exactly what needs to be done. Dan so if I want to make up

Re: the C JIT

2000-08-31 Thread David L. Nicol
David Corbin wrote: A C JIT is an interesting idea. I think that a project works best when it has a set of goals (I haven't seen one yet really for Perl 6). Unless this is one of the goals, I can easily see how this could become a serious distraction to what I perceive as the likely

Re: Perl Implementation Language

2000-09-15 Thread David L. Nicol
Dan Sugalski wrote: 1) How fast is the C (or whatever) code it emits likely to be? The perl-in-perl interpreter would not be a deliverable. Speed would not be its goal. It would be a reference implementation that would be easier to break and repair. An internals tutorial, if you will. So

Re: RFC 302 (v1) Unrolling loops and tail recursion

2000-09-25 Thread David L. Nicol
Simon Cozens [EMAIL PROTECTED] formally RFC'd: I have no idea how to implement tail recursion elimination, and I'd dearly love to learn. Unrolling loops with constant indices shouldn't be too hard. AIUI you trigger your destructors on the appearance of the "return" keyword rather than on

Re: RFC 334 (v1) Perl should allow specially attributed subs to be called as C functions

2000-10-13 Thread David L. Nicol
Dan Sugalski wrote: If there's no hit, I'd love to have all perl functions callable from outside. I'm not sure that'll be the case, though I'm all for it... With the 334 infrastructure, the -o option to generate a linkable object from a perl program/library (RFC 121) will be most do-able:

Re: RFC 334 (v1) I'm {STILL} trying to understand this...

2000-10-13 Thread David L. Nicol
Dan Sugalski wrote: At 08:57 PM 10/12/00 +0100, Simon Cozens wrote: On Thu, Oct 12, 2000 at 03:43:07PM -0400, Dan Sugalski wrote: Doing this also means someone writing an app with an embedded perl interpreter can call into perl code the same way as they call into any C library. Of

Re: (COPY) compile-time taint checking and the halting problem

2000-10-20 Thread David L. Nicol
Steve Fink wrote: It's standard semantic analysis. Both your taintedness analysis and my reachability analyses can be fully described by specifying what things generate the characteristic you're analyzing, what things block (in the literature, "kill") it, and the transfer rules. It's often

How to tell (in perl5) if friz is a core command or not?

2000-10-26 Thread David L. Nicol
Anyone remember when I posted the top level of a language prototyping environment? Well, that system has now grown a lexical parser that can understand arbitararily deep doublequotes, and I'm working on a perl5 into perl5 capability for it. Is there a way to determine if a word is defined

Re: interesting read: why the EROS project has switched from C++ to C

2001-01-16 Thread David L. Nicol
Simon Cozens wrote: On Tue, Jan 16, 2001 at 08:49:57PM +, David L. Nicol wrote: http://www.eros-os.org/pipermail/eros-arch/2001-January/002683.html Uhm. That's not *why* they're doing it, it's how they're doing it. Did you get the right URL? I thought I did -- now that message

Re: Autovivification behavior

2001-01-21 Thread David L. Nicol
"Deven T. Corzine" wrote: On Sat, 23 Dec 2000, Graham Barr wrote: This has been discussed on p5p many many times. And many times I have agreed with what you wrote. However one thing you did not mention, but does need to be considered is func($x{1}{2}{3}) at this point you do

Re: PDD for code comments ????

2001-02-19 Thread David L. Nicol
Jarkko Hietaniemi wrote: Some sort of simple markup embedded within the C comments. Hey, let's extend pod! Hey, let's use XML! Hey, let's use SGML! Hey, let's use XHTML! Hey, let's use lout! Hey, ... Either run pod through a pod puller before the C preprocessor gets to the code, or

Re: defined: Short-cutting on || with undef only.

2001-02-19 Thread David L. Nicol
I think "defined" should be altered so that it only looks like a function, but in effect alters the tests being made by the thing that is looking at it. if (defined $x){ # slower than if ($x){ # or if($x or defined($x)) could be made faster by propagating the "defined" question up

Re: PDD for code comments ????

2001-02-20 Thread David L. Nicol
David Mitchell wrote: 4. Are we all agreed that in addition to anything else (eg rfc281), at least some of the standard commentary should appear actually within the src file itself? s/at least some/most, if not all/ 5. Do *all* these comments need to be extractable, or only ones related

Re: Tolkein (was Re: PDD for code comments ????)

2001-02-20 Thread David L. Nicol
Simply Hao wrote: Douglas Adams does seem rather more appropriate a source of quotes for software (anyone's, alas) than Pratchett. But Adams already has a software company. And Sirius pioneered the GPP in Perl 6.

Re: wacko idea

2001-04-24 Thread David L. Nicol
Uri Guttman wrote: i was looking at dan's PMC arena allocator struct and it reminded me of something an older language can do (which MJD has likened to an early perl :). ever heard of AREA in PL/I? it was a large chunk of ram dedicated to allocate memory from. what was special is that all

deferred vtable assignment?

2001-04-25 Thread David L. Nicol
Dan Sugalski wrote: 2) Anyway, even resizing vtables we would need some more indirection to determine in which position of the vtable is which operator. No. Each operator goes in a fixed position in the vtable, and it's the same for each table. Anything else is nasty, error prone, and

Re: deferred vtable assignment?

2001-04-26 Thread David L. Nicol
Dan Sugalski wrote: What if the decision in-vtable or not-in-vtable is deferred? That's doable, I think, though I can see some issues. how about a two-tiered vtable, where a single high bit, if set, indicates extended handling, or at least consultation of a different table. I guess that

continuations are prerequisite for coroutines

2001-05-01 Thread David L. Nicol
Dan Sugalski wrote: We don't have continuations yet... But there's nothing at the lowest levels of the interpreter that prevent that. You could, if you chose, get a stream of bytecode that would do you continuations. Slowly and awkwardly, perhaps, but still do them. (I'm all up for doing

Re: Please shoot down this GC idea...

2001-05-02 Thread David L. Nicol
Damien Neil wrote: sub foo { my Dog $spot = shift; my $fh = IO::File-new(file); $spot-eat_homework($fh); } Even with the object type declared, the compiler can make no assumptions about whether a reference to $fh will be held or not. Perhaps the Poodle subclass of Dog

Re: Please shoot down this GC idea...

2001-05-02 Thread David L. Nicol
David L. Nicol wrote: i'm swearing off sort-by-subject. Sorry.

Re: Stacks, registers, and bytecode. (Oh, my!)

2001-06-04 Thread David L. Nicol
Larry Wall wrote: Sure, you can download the object code for this 5 line Perl program into your toaster...but you'll also have to download this 5 gigabyte regex interpreter before it'll run. That's a scenario I'd love to avoid. And if we can manage to store regex opcodes and state

Re: Stacks, registers, and bytecode. (Oh, my!)

2001-06-04 Thread David L. Nicol
Jarkko Hietaniemi wrote: Err...a regex that isn't a regex, is this a Zen koan...? Ahhh, you want to emulate the state machine in Pure Perl. Okay... next thing you want to do is to write symbolic assembler in C...? :-) I have my reasons :) Actually, I want to write a c into perl compiler

Re: Stacks, registers, and bytecode. (Oh, my!)

2001-06-05 Thread David L. Nicol
Graham Barr wrote: I think there are a lot of benefits to the re engine not to be separate from the core perl ops. So does it start with a split(//,$bound_thing) or does it use substr(...) with explicit offsets?

Re: Should we care much about this Unicode-ish criticism?

2001-06-06 Thread David L. Nicol
Russ Allbery wrote: a caseless character wouldn't show up in either IsLower or IsUpper. maybe an IsCaseless is warrented -- or Is[Upper|Lower] could return UNKNOWN instead of TRUE|FALSE, if the extended boolean attributes allow transbinary truth values.

Re: -g vs. -O

2001-07-06 Thread David L. Nicol
Benjamin Stuhl wrote: (eg. I solemnly swear to never use symbolic references, count on specific op patterns, or use any number large enough to require bignums.) These are things (aside from the number limit, but overflow catching is needed

Re: PDD 4, v1.3 Perl's internal data types (Final version)

2001-07-06 Thread David L. Nicol
Dan Sugalski wrote: The C structure that represents a bigint is: struct bigint { void *buffer; UV length; IV exponent; UV flags; } =begin question Should we scrap the buffer pointer and just tack the buffer on the end of the structure? Saves a level of

Re: -g vs. -O

2001-07-06 Thread David L. Nicol
Dan Sugalski wrote: At 12:51 PM 7/6/2001 -0500, David L. Nicol wrote: Benjamin Stuhl wrote: (eg. I solemnly swear to never use symbolic references, count on specific op patterns, or use any number large enough to require bignums

Lexically scoped optimization hints

2001-07-06 Thread David L. Nicol
Dan Sugalski wrote: At 01:59 PM 7/6/2001 -0500, David L. Nicol wrote: in-code pragmata instead of compiler switches? Lexically scoped optimization hints seem like rather a tricky thing to deal with. I know I'm naive but here's how I see it: - we design a linkage standard

Re: CLOS multiple dispatch

2001-09-05 Thread David L. Nicol
Dan Sugalski wrote: [... massive sniping snippage ...] The problem I was talking about was those cases where we have a good but not perfect match at compile time. In the case you gave, we assume that @A are full of fish, so dispatch to the multiple fish parameter version of list_medication.

A discussion of writing to the GCC front end

2001-09-11 Thread David L. Nicol
http://cobolforgcc.sourceforge.net/cobol_14.html