Re: Matt's Maturity

new topic     » goto parent     » topic index » view thread      » older message » newer message

ken mortenson wrote:
> 
> Matt Lewis wrote:
> > 
> > Unless we're looking at different things, here was how you got a value for
> > rid_dbOpen:
> > }}}
<eucode>
> >   atom rid_dbOpen
> >   rid_dbOpen = define_c_func(dbSQL, "dbOpen", {C_POINTER}, C_LONG)
> > </eucode>
{{{

> > 
> > The 2 was returned by define_c_func, which has no knowledge of a vector 
> > table in the PowerBASIC DLL.  Your intuition was coincidence.
> 
> dbSQL is a PowerBasic DLL. "dbOpen" is the second function defined
> therein.  Are you ignorant of how define_c_func works?
> 
> My intuition was spot on.  Thank you for reinforcing that point.

No, it turns out I'm not ignorant of how define_c_func works.  I'll walk 
you through what you're seeing:

...from source/execute.h:

struct arg_info {
	int (*address)();     // pointer to C function
	s1_ptr name;          // name of routine (for diagnostics)
	s1_ptr arg_size;      // s1_ptr of sequence of argument sizes
	object return_size;   // atom or sequence for return value size
	int convention;       // calling convention
};

...from source/be_machine.c:

int c_routine_next = 0;       /* index of next available element */
struct arg_info *c_routine = NULL; /* array of c_routine structs */

Here is a bit of the back-end implementation of define_c_func (just the 
start and the end):

object DefineC(object x)
/* define a C routine: x is {lib, name, arg_sizes, return_type or 0} 
alternatively, x is {"", address or {'+', address}, arg_sizes, return_type or
   0}
   Return -1 on failure. */
{
...
        proc_address = (int (*)())GetProcAddress((void *)lib, routine_string); 
...
	c_routine[c_routine_next].address = proc_address;
...
	return c_routine_next++;
}

You can look up the rest of the code yourself, but as you can see, euphoria
uses GetProcAddress along with the name of the exported function.  It stores
a pointer to that structure in an array, and returns the index for that
particular arg_info.

> > > Finally, it is cowardly of you to claim me ignorant in any respect without
> > > providing evidence as I've done in the passage above so that I am at a
> > > severe handicap to defend myself.
> > 
> > Why is it cowardly?
> 
> Because in your original post you made the accusation without support.
> Only in subsequent post did you provide evidence, but not so I could
> defend myself but so you could prove how right you were.  As I am
> demonstrating here I am able to defend myself when provided with
> specific allegations rather than indefensible slurs.
> 
> To accuse without giving the accused the means of defending themselves
> is a cowardly act.  A mature person knows that.

Sorry, I wasn't really accusing you of anything.  It's true that I didn't
provide references in the original.  I reread my original post:
http://www.openeuphoria.org/EUforum/m21806.html

...and I still think it was a pretty neutral statement of my observations.

> >  In the case above, with define_c_func, you proved your
> > ignorance of how that feature of the language works.
> 
> As I've already shown above, you are still continuing to show your
> ignorance about the source of the number while my intution has proved
> to be entirely correct.  This next part is beautiful...
> 
> >  According to the docs,
> > which I believe someone responded to your original post with a link:
> > 
> >   "A small integer, i1, known as a routine id, will be returned."
> 
> You read, but without understanding.  What is the source of this small
> integer?  Magic?  No, it's seems it's from the vector table of the DLL.

I don't follow this jump to the vector table in the dll, or what it is.
Are you referring to the export by ordinal, perhaps?  Even so, as I 
showed above, you were incorrect.

> > It's interesting [to me] that you construed all of this as a personal 
> > attack, especially after making such a big deal about your lack of social
> > graces.  To wit:
> 
> It was a personal attack.  Make no mistake.  Calling me a troll is also
> a personal attack.  I've had the decency of explaining to you why it
> was a cowardly attack.  If you were a gentleman you would apologize
> for doing so (rather than continuing with the troll comments and digging
> yourself in deeper by continuing to try to prove what I have repeated
> demonstrated to be wrong.)

I'll grant the troll comment.  But as Keith David said in _Men at Work_,
"He was provokin me!"  

I don't have a problem admitting it when I'm wrong.  I even admitted once 
(and a half?) where I was wrong.  But you continue to say false things 
about define_c_func, displaying your ignorance.  Who is digging?

> > > You can believe anything you like about me.
> > > 
> > > I believe that you are no gentleman and a coward.
> > 
> > And you are welcome to believe whatever you like.  I'm done feeding the 
> > trolls.
> 
> The ball is now in your court.  Your actions define who you are.
> Notice I'm not calling you names.  Calling you a coward is a specific
> response to your actions and you can prove me wrong with an apology.

You're not calling me names in *this* post (though you still quoted the names
you called me previously).  I'll admit that you're not really a troll 
(though some of your posts about gotos, structured code, and
other general programming philosophies seem at least borderline), just that 
you were correct when you claimed to be a poor communicator.

I often have a similar problem.  I've often thought a lot about a particular
issue, and have developed a strong opinion.  When the topic comes up, I'm
not hesitant to let others know.  It comes across as a knee jerk reaction
and irritates people (esp my wife, who never fails to let me know!),
because my opinions seem unfounded or poorly thought out--even though the
opposite is true.

Something I read every so often, that is a huge help for fora like this:

http://www.catb.org/~esr/faqs/smart-questions.html

You may have seen it before.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu