Non-constant constant strings

B

BartC

I will have my own debugger, called Debi, which works with my ABI, the
compiler architecture and design, and is able to handle edit-and-continue
as I have designed it.

You've mentioned this a few times but I can't get my head around it. How
much editing are you allowed to do (such as rewriting the entire program to
do something completely different)? What about even a one-line change, but
which happens to affect the entire program globally such that any results so
far are rendered meaningless?
The debugger will also be able to target the three
platforms I intend to support: x86, ARM, and my VVM's assembly language,
codenamed OBED.

Is this it in action:

_SYSTEM_SECONDS_SINCE_BOOTUP EQU 0 ; dword
_SYSTEM_SECONDS_SINCE_MIDNIGHT EQU 4 ; dword
_SYSTEM_HOURS EQU 8 ; byte
_SYSTEM_MINUTES EQU 9 ; byte
_SYSTEM_SECONDS EQU 10 ; byte

Because there must be a better way of managing all those offsets than having
to manually edit them every time something changes.
 
R

Rick C. Hodgin

I laughed out loud, turned off my computer, and went on a three day drive
to ultimately touch the waters of Lake Michigan, some 12 hours away by my
route. :)

That should be "Lake Superior". And I got two speeding tickets on
the way. :) One was deserved. The other was in an area of Michigan
where the police officer clocked me passing a slow moving vehicle,
and made me drive to an ATM and withdraw money and pay the fine in
cash right there on the spot in cash.

Best regards,
Rick C. Hodgin
 
R

Rick C. Hodgin

You've mentioned this a few times but I can't get my head around it.
How much editing are you allowed to do (such as rewriting the entire
program to do something completely different)?

All of it. You can delete everything you've coded. Or you can paste in
entire source code files from within the debugger.
What about even a one-line change, but which happens to affect the
entire program globally such that any results so far are rendered
meaningless?

As the developer you'll have to recognize the scope of the change. The
compiler and debugger will allow the changes to be made, and may also
report on some aspects of data that's no longer valid (albeit silently,
as through an output window conveying compile-time information), but
anything that is specific to an otherwise sequential execution of the
application (such as prior built data from a previous function call)
will need to be known by the developer, and then a restart issued.
Is this it in action:
_SYSTEM_SECONDS_SINCE_BOOTUP EQU 0 ; dword
_SYSTEM_SECONDS_SINCE_MIDNIGHT EQU 4 ; dword
_SYSTEM_HOURS EQU 8 ; byte
_SYSTEM_MINUTES EQU 9 ; byte
_SYSTEM_SECONDS EQU 10 ; byte

Because there must be a better way of managing all those offsets
than having to manually edit them every time something changes.

That's not it. Those things you see there are a global data segment that
was available within my OS to all programs running at any RING to be able
to read those values without having to query them through an API protocol.
I had setup the segment to contain things that would be usable everywhere,
and it would be expanded over time as needed. Only the core OS kernel in
RING0 had a read-write descriptor to that data.

If you're looking at the code for my debugger in my operating system,
you will find it here:

https://github.com/RickCHodgin/libsf-full/tree/master/_exodus/source/debi

If you'd like to see it in operation, use the bochs 3.5 emulator I modified
to transmit the Hercules Graphics memory regions to the MoMo (Monochrome
Monitor) app I created which simulates the HGA/MDA interface. The only
caveat is that in that environment the keyboard focus must be on the Bochs
window, but the mouse activity goes into the MoMo window. :)

Best regards,
Rick C. Hodgin
 
R

Rick C. Hodgin

You've mentioned this a few times but I can't get my head around it.
How much editing are you allowed to do (such as rewriting the entire
program to do something completely different)? What about even a
one-line change, but which happens to affect the entire program
globally such that any results so far are rendered meaningless?

In addition, I have introduced a concept within the design of my virtual
machine which I call a PURSUE. It is a condition that must be entered,
either as by activity in the debugger, or programmatically (as in the
Visual FreePro command PURSUE). You can see the icons here:

https://github.com/RickCHodgin/libsf/blob/master/vvm/core/vdebug/graphics/vdebug_icons.bmp

The fist three "P" icons are the pursue mode icons, along with other
ones within.

Once a pursue is entered in the virtual machine, all subsequent memory
and disk writes are shunted to a "holding area" which is not committed
until later, at a future time, when the VVM is told to accept the PURSUE
data and commits the memory and disk writes permanently, again either by
interaction from within the debugger, or programmatically. In the
alternative, the PURSUE could be abandoned, whereby the memory variables
are all restored to the state which existed when the PURSUE was entered.

In this way, if you know you'll be doing editing, and you can take the
performance hit by compiling your code for the VVM's engine, rather than
the native CPU, then you could enter a PURSUE, being your testing, and
later accept or reject those changes based on the real-time debugging
needs of your session. You could reject the PURSUE, and then enter the
PURSUE again, and repeat the cycle as often as needed.

Best regards,
Rick C. Hodgin
 
B

BartC

That's not it. Those things you see there are a global data segment that
was available within my OS to all programs running at any RING to be able
to read those values without having to query them through an API protocol.
I had setup the segment to contain things that would be usable everywhere,
and it would be expanded over time as needed. Only the core OS kernel in
RING0 had a read-write descriptor to that data.

If you're looking at the code for my debugger in my operating system,
you will find it here:


https://github.com/RickCHodgin/libsf-full/tree/master/_exodus/source/debi

That's some pretty-looking ASM code. However, assuming this isn't the output
of some HLL (the presence of comments makes that unlikely), you really don't
want to be writing GUI stuff, which a lot of this seems to be be, in
assembler. Use a HLL - any HLL, whether it's your own, or C, or some other.

C is perfectly up to the job (and the few bits it can't handle, put *those*
in an ASM module, those read-write strings included.)
 
S

Seebs

You should have the courage to name the people you are being rude
about. You are one of the "regs" here, so is Kenny. The term is used
to avoid responsibility.

And is sort of ridiculous, as obviously at least some of the "regs" use
debuggers at least some of the time.

-s
 
D

David Brown

The ones every couple of weeks are ones I don't catch easily during the
development process. It's because, for example, I meant in my head to
type the variable "foo" but instead I typed the variable "i" because I
was thinking ahead to my next for loop. That kind of error results in
something that I cannot easily determine the cause of because in my mind
I typed "foo" ... it's just that in my code I typed "i". So, as I'm
going back through my code step-by-step, line-by-line, I'm having to
figure out what is wrong.

Modern developers solve many cases of that particular problem by using
minimal scope. When your loops are "for (int i = 0; i < 10; i++)", then
you can't mix up "i" and "foo". Good programming practice - something
you seem determined to avoid, at least in some aspects - reduces the
risk of such errors. Of course, no language or development tool is
going to catch /everything/, but you should take advantage of what you
can get, rather than trying to invent new and worse systems.
I'm getting better at this over the years. I don't make as many mistakes
as I used to in all of my development. It's these odd occasional ones
that really throw me sometimes though. I once spent three days (back in
the early 1990s) debugging an application I had written, stepping through
every line of code, only to conclude that there was absolutely nothing
wrong with my algorithms. I then started back over and reproduced the
steps from the beginning I did to try to recreate the error, including
creating the actual initialization files. In the process, I remembered
that I had copied over some code from another system. The other system
had an piece of data that was 10 characters long, and this one I was
using needed it to be 7. I realized as I was going through those non-
programming setup portions that I had left it at 10 instead of 7, and
that was the cause of my error.

I laughed out loud, turned off my computer, and went on a three day drive
to ultimately touch the waters of Lake Michigan, some 12 hours away by my
route. :)


Yes. For those who are able to do development and testing of algorithms
in the edit-and-continue environment, people will see a marked improvement.

Again, you are extrapolating from a single example - you - to every
programmer the world over. It makes no sense.
My targets are: Windows, Linux, FreeBSD, and Android. I will never support
any Apple product. And I will at some point remove support for Windows and
later Linux and FreeBSD once I get my own operating systems up to snuff.

I'm sure that will make it /really/ popular.
Thank you. And thank you. It is something I offer unto the Lord. I am
giving back to Him the best I have been given by Him in terms of my
abilities and knowledge. I desire to have a product on this Earth which
is founded upon faith in Him, able to bring the Christian concept of "Love
thy neighbor as thyself" into a practical example, through code sharing,
through an organization that acknowledges Jesus Christ as the head of our
lives and the reasons why we move. I don't see that other places on this
Earth. If I did, I would probably contribute my time there.

I actually was nearly committed to completing the HURD kernel for the GNU
project, but came across some quotes by Richard Stallman related to heinous
sexual acts, things he believed in. I emailed him to find out about those
quotes, to validate that he was accurately quoted and really believed those
things. He did. As such, I disavowed myself from contributing to any of
the GNU projects or any part of the FSF because of Richard Stallman being
at the head, and that contrary spirit filtering down through the ranks.

There are many people that disagree with things RMS says or does.
Personally, I am an "open source" fan rather than a "free software" fan
- I think a number of things RMS and his ilk say are rather fanatical.
But it is useful to have such fanatics around, as long as they don't get
/too/ much influence - when you concentrate too much on a single issue,
you lose the wider perspective. It's a bit like the Green party - the
world is a better place because of them and their political pressure,
but you certainly wouldn't want them as a government.

However, this is the first time I have ever heard anyone disagree with
RMS because of some "heinous sexual acts" !
The Liberty Software Foundation was created after that as a purposeful
alternative, one devoted to Jesus Christ.

I have been trying to avoid this subject - but here goes. Christianity,
or any other religion, has nothing to do with "liberty". This is
especially the case for the more obsessive religious people, who are
unable to make the distinction between their personal beliefs, and the
things they do, or who are unable to understand that difference in other
people (such as condemning all GNU software on the basis of statements
made by a project leader). "Liberty" is about letting other people have
their opinions, beliefs, and actions - as long as it does not directly
harm others, people should be free to do and say as they will. Religion
is the antithesis of this - it is about controlling people, telling them
what to think, believe and do, and judging them according to your own ideas.

So by all means make your own "software foundation", but you have no
business calling it the "Liberty Software Foundation", because that is
not what it is about.
 
I

Ian Collins

Rick said:
The ones every couple of weeks are ones I don't catch easily during the
development process. It's because, for example, I meant in my head to
type the variable "foo" but instead I typed the variable "i" because I
was thinking ahead to my next for loop. That kind of error results in
something that I cannot easily determine the cause of because in my mind
I typed "foo" ... it's just that in my code I typed "i". So, as I'm
going back through my code step-by-step, line-by-line, I'm having to
figure out what is wrong.

If you coded to pass unit tests, these errors wouldn't propagate beyond
the first fail.
 
R

Rick C. Hodgin

If you coded to pass unit tests, these errors wouldn't propagate beyond
the first fail.

The errors I'm talking about occur during initial development, while I'm
there in the code writing new algorithms, or making the change. I don't
generally leave code in a broken state unless there are external
constraints (such as a son's soccer game). In such a case I'll leave
some broken syntax nearby so I can see where I was working, but on the
whole everything I check in is working.

Best regards,
Rick C. Hodgin
 
R

Rick C. Hodgin

That's some pretty-looking ASM code. However, assuming this isn't the output
of some HLL (the presence of comments makes that unlikely), you really don't
want to be writing GUI stuff, which a lot of this seems to be be, in
assembler. Use a HLL - any HLL, whether it's your own, or C, or some other.
C is perfectly up to the job (and the few bits it can't handle, put
*those* in an ASM module, those read-write strings included.)

I had no intention of continuing development in assembly even back in the
early 2000s. I began working on what I called at that time q/Language,
which was a combination Microsoft Macro Assembler-compatible assembler, as
well as a C-like language. I intended to do all of my future development
in that language, but I never had time to develop it.

I was proceeding with a model I called CFSCA (pronounced "cough ska"). It
is a system whereby things are coded from broad strokes down to the nitty
gritty details. It stands for Comments, Flowchart, Source Code, Assembly.
The idea is you write down a system design in comment form, and then
flowchart it out (either in pseudo-code, or a real flowchart), and then
write source code, which is converted to assembly and finally assembled.

In this way, my debugger would've allowed stepping through code at any of
those levels, along with changes being made at any of those levels.

I never intend to write anything in raw assembly again, except for those
portions which are required for translation from my compiler's needs to
the mechanics of the target ISAs. Those endeavors are for the people who
are in their 20s, not their 40s. :)

I plan to do something similar to the CFSCA model with WideEdit, but it
will not be quite the same. I have a different idea in mind that I will
reveal at some future time.

Best regards,
Rick C. Hodgin
 
K

Kaz Kylheku

You should have the courage to name the people you are being rude
about. You are one of the "regs" here, so is Kenny. The term is used
to avoid responsibility.

(gdb) info reg
 
R

Rick C. Hodgin

I have been trying to avoid this subject - but here goes. Christianity,
or any other religion, has nothing to do with "liberty" ... "Liberty" is
about letting other people have their opinions, beliefs, and actions -
as long as it does not directly harm others, people should be free to
do and say as they will. Religion is the antithesis of this - it is
about controlling people, telling them what to think, believe and do,
and judging them according to your own ideas.

So by all means make your own "software foundation", but you have no
business calling it the "Liberty Software Foundation", because that is
not what it is about.

FLOSS stands for Free/Libre Open Source Software. "Libre" = "Liberty"
in English. I chose the name because it relates to the Libre word in
English. It is like the Free Software Foundation, except that it is the
Liberty Software Foundation. I refer to my software as "liberty software"
instead of "free software" but for all intents and purposes it is the
same thing.

The choice of name has nothing to do with religion, but relates to the
nature of the software involved. People are free to take my software
and use it for any purpose, which is where the word "liberty" comes into
play.

Best regards,
Rick C. Hodgin
 
I

Ian Collins

Rick said:
The errors I'm talking about occur during initial development, while I'm
there in the code writing new algorithms, or making the change.

Which is the most effective time to be using unit tests.

My point was if you are coding to pass tests, you remove the "ones I
don't catch easily during the development process" because the
development process is deigned to avoid them. You also know what you
check in is working as you expected and you can check in more often.
 
R

Rick C. Hodgin

Which is the most effective time to be using unit tests.

Are you suggesting I write a unit test (or unit tests) before I even have
the algorithm I'll be testing coded or debugged?
My point was if you are coding to pass tests, you remove the "ones I
don't catch easily during the development process" because the
development process is deigned to avoid them. You also know what you
check in is working as you expected and you can check in more often.

I create my algorithms, debug them, and once they are working I code tests
for them that use input and expect certain output.

Best regards,
Rick C. Hodgin
 
D

David Brown

FLOSS stands for Free/Libre Open Source Software. "Libre" = "Liberty"
in English. I chose the name because it relates to the Libre word in
English. It is like the Free Software Foundation, except that it is the
Liberty Software Foundation. I refer to my software as "liberty software"
instead of "free software" but for all intents and purposes it is the
same thing.

The choice of name has nothing to do with religion, but relates to the
nature of the software involved. People are free to take my software
and use it for any purpose, which is where the word "liberty" comes into
play.

If the software foundation is devoted to freedom (either of the software
itself, or the people using it), then "liberty" is a perfectly good
name. But if it is devoted to a particular god or religion, then the
name should reflect that - neither a person nor a "foundation" can be
dedicated to freedom /and/ a religious belief. (Of course, some people
view the FSF as a "religion"...)
 
R

Rick C. Hodgin

If the software foundation is devoted to freedom (either of the software
itself, or the people using it), then "liberty" is a perfectly good
name. But if it is devoted to a particular god or religion, then the
name should reflect that - neither a person nor a "foundation" can be
dedicated to freedom /and/ a religious belief.

The choice of not putting a religious name on the organization relates to
the general concept of Christianity. We are taught in scripture that, as
believers, in all things we do we, be they in word or deed, we are to do
them all in the name of the Lord Jesus Christ, giving thanks to God the
Father through Him. As such, this is a standard operating procedure and
not a special thing. It is not something that needs attention drawn to
it, but rather is just part of who we are.

On the front door there is a cross. :) When you walk in the door you
can hear the Christian music everywhere. It will not take long for someone
to find out that we are Christians.
(Of course, some people view the FSF as a "religion"...)

:) Yes. As they also do coding styles.

Best regards,
Rick C. Hodgin
 
I

Ian Collins

Richard said:
What crap. No unit tests in the world ever fully mimicked a fully
assembled live system.

Oh I agree, unit test are just the first level of tests. There should
be at least one more level of system testing on top.
The chance of all cases being thought out in unit
tests is probably non existent give or take.

Did I ever say they were?

I was focusing on silly, often hard to spot, typos that just happen to
compile. If he intended to type the variable "foo" but instead typed
the variable "i" in a function he had written a test for, the test would
fail. he would then know to check the few lines of code he had just
written, see the typo and fix it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,077
Messages
2,570,567
Members
47,204
Latest member
abhinav72673

Latest Threads

Top