: pic-tail-reg ( -- reg ) EDX ;
//stack pointer // ?: stack-reg ( -- reg ) ESP ;
// stack frame pointer: frame-reg ( -- reg ) EBP ;
// virtual machine object base: vm-reg ( -- reg ) EBX ;
: ctx-reg ( -- reg ) EBP ;
// non-volatile registers -- these would be registers needing to be preserved
A few more: // ?: shift-arg ( -- reg ) ECX ;
// ?: div-arg ( -- reg ) EAX ;
// ?: mod-arg ( -- reg ) EDX ;
From: mclag...@hotmail.com
To: factor-talk@lists.sourceforge.net
Date: Fri, 17 Aug 2012 14:03:30 +
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot
pic-tail-reg = polymorphic inline cache tail call register
ds-reg = data stack register
rs-reg = retain stack register
nv-reg: might help to see
https://github.com/slavapestov/factor/blob/master/basis/cpu/x86/bootstrap.factor#L14
link-reg: only place it seems to be used is
Thank you Alex. Seeing the polymorphic inline caching reference makes me
realize that I really need to go back and reread Slava's (et. al) various blogs
that have been produced through the years. I read them all once, but that was
a couple years ago -- not knowing what I know now. This
Hi -- Okay. I'm going to ask for my first lifeline. :) I'm tracing through
some arcane stuff indeed. Everything is going along swimmingly. I get to the
word new-key@, which at its start wants to execute [ array 2dup hash@ 0 f
(new-key@) ] with the keep combinator. All good so far. array
In the listener, if you run this code:
IN: scratchpad clear
IN: scratchpad value key associate
Then step over to [ set-at ] keep
If at this point you just keep stepping into things, you should do a deep
dive into all the parts, including the 4 slot { array } declare which
should give
Wow. Great, John! Thanks. This should keep me at bay for a good while.
From: mrj...@gmail.com
Date: Thu, 16 Aug 2012 08:10:31 -0700
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot
image?
In the listener, if you run this
Btw, you might be wondering why you can't step into the slot word:
If you look at it, it's a primitive, meaning implemented in the VM C++ code
or a compiler intrinsic:
```
IN: scratchpad \ slot see
IN: slots.private
PRIMITIVE: slot ( obj m -- value ) flushable
```
In this case, I believe it is
So then, John, does that mean that in the [ 4 slot { array} declare ],
that I'm getting the slot named array which is at offset 4 (and then
declaring that to be an array, so as to disable some of the type safety
checks)?
Yes, the hashtable code is written at a bit lower level and thus maybe
Great, thanks.
Sent from my iPhone
On Aug 16, 2012, at 1:11 PM, John Benediktsson mrj...@gmail.com wrote:
So then, John, does that mean that in the [ 4 slot { array} declare ], that
I'm getting the slot named array which is at offset 4 (and then declaring
that to be an array, so as to
Quick question. Any way of having the data and retain stack panes of the
Walker display values in hex?
Date: Mon, 13 Aug 2012 12:21:52 -0400
From: arc...@gmail.com
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot
image?
If you want all numbers to print in hex, the easiest way is:
```
IN: scratchpad 16 number-base set-global
```
On Wed, Aug 15, 2012 at 4:04 AM, Michael Clagett mclag...@hotmail.comwrote:
Quick question. Any way of having the data and retain stack panes of
the Walker display values in hex?
Thanks. I knew it had to be something like that. And if I want it to be the
default every time I load the Listener, I'm sure there must be a way to set
that up?
Sent from my iPhone
On Aug 15, 2012, at 11:01 AM, John Benediktsson mrj...@gmail.com wrote:
If you want all numbers to print in
1) Factor loads a ~/.factor-rc file every time it starts. You can put
things there:
USE: tools.scaffold
scaffold-factor-rc
Click it, edit it and add:
USING: prettyprint.config namespaces ;
16 number-base set-global
2) Alternately, there's a boot rc file that gets loaded after bootstrap:
Beautiful. Thanks.
Sent from my iPhone
On Aug 15, 2012, at 11:30 AM, Doug Coleman doug.cole...@gmail.com wrote:
1) Factor loads a ~/.factor-rc file every time it starts. You can put
things there:
USE: tools.scaffold
scaffold-factor-rc
Click it, edit it and add:
USING:
One constructive criticism type comment, if you'll permit me. While what I
say directly below is absolutely true, it's true on a micro level. At the
broader level, the heavy use of (sometimes lengthy) quotations to feed
workhorse words like define-sub-primitive make understanding what's
Any documentation that you write as part of your investigation would be
welcome contributions.
On Tue, Aug 14, 2012 at 5:27 PM, Michael Clagett mclag...@hotmail.comwrote:
One constructive criticism type comment, if you'll permit me. While
what I say directly below is absolutely true, it's
Roger, that. I will definitely do it. In fact, I think you will be
pleasantly surprised.
From: mrj...@gmail.com
Date: Tue, 14 Aug 2012 17:35:39 -0700
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot
image?
Any
Is this you?
http://www.clarkprosecutor.org/html/death/US/clagett651.htm
On Mon, Aug 13, 2012 at 9:46 AM, Michael Clagett mclag...@hotmail.com wrote:
Thank you, Joe, for the quick response. It was actually the information in
the such as clause of your last sentence that I was looking for. I
(So you had better be nice to me; I don't mess around.)
Date: Mon, 13 Aug 2012 09:50:04 -0700
From: doug.cole...@gmail.com
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot
image?
Is this you?
Been looking at some of the x86 assembler code. Damn! All I can say is that I
wish to hell I had had Factor when I wrote my own. Quite a bit different
approach, but the clarity and succinctness is tantalizing.
From: mclag...@hotmail.com
To: factor-talk@lists.sourceforge.net
Date: Mon, 13
P.S. Incidentally, while I am on the subject, I find myself able to trace
through the VM startup code in Visual Studio with no problem at all, until I
get to the factor_vm::c_to_factor, which wraps a c-to-factor sub-primitive
inside of a callback stub and then invokes that function.
Not a problem any more. WinDbg does the trick just fine. It was just Visual
Studio.
From: mclag...@hotmail.com
To: factor-talk@lists.sourceforge.net
Date: Fri, 10 Aug 2012 11:51:00 +
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image?
P.S.
You might also find it useful to try the Walker which allows you to step
through Factor code:
http://docs.factorcode.org/content/article-ui-walker.html
On Fri, Aug 10, 2012 at 10:29 AM, Michael Clagett mclag...@hotmail.comwrote:
Not a problem any more. WinDbg does the trick just fine. It
Thanks for the reference. I assume that will be helpful once I get past
stepping through the bootstrapping code and am in the Listener
environment.From: mrj...@gmail.com
Date: Fri, 10 Aug 2012 10:40:28 -0700
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making
Hi -- I've been trying to run the make-image word from the Listener and got as
far as this trace: IN: scratchpad Command: restart
1: Note:
Added bootstrap.image vocabulary to search path
x86.32 make-image
Loading resource:/core/bootstrap/stage1.factor
Bootstrap stage 1...
Loading
Typically the architecture is a combination of os and arch:
IN: scratchpad my-arch .
unix-x86.64
You can use the my-arch word to make an image for your architecture:
IN: scratchpad my-arch make-image
On Fri, Aug 10, 2012 at 1:56 PM, Michael Clagett mclag...@hotmail.comwrote:
Beautiful. Worked like a charm. Thanks.
From: mrj...@gmail.com
Date: Fri, 10 Aug 2012 14:01:58 -0700
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot
image?
Typically the architecture is a combination of os and arch:
Quick question, if you're still on the horn. How do I trace into myarch
make-image from the Listener. If I hit enter it just executes. I'm sure there
must be any easy way to step into it, which I'm sure I can find by searching
the documentation. But perhaps you could save me five minutes.
Write my-arch make-image in listener.
Then type Ctrl-W to walk it.
Step across my-arch
Into into make-image
Rinse, repeat. :)
On Fri, Aug 10, 2012 at 2:08 PM, Michael Clagett mclag...@hotmail.comwrote:
Quick question, if you're still on the horn. How do I trace into myarch
make-image
Thanks much. This should keep me occupied and out of everyone's hair for a
while.
From: mrj...@gmail.com
Date: Fri, 10 Aug 2012 14:10:41 -0700
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot
image?
Write my-arch make-image
Thanks much. This should keep me occupied and out of everyone's hair for
a while.
No worries, keep the questions coming!
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's
For anyone else who might happen onto the problem I had, the solution ended up
being that my architecture was named windows-x86.32, not x86.32.
From: mrj...@gmail.com
Date: Fri, 10 Aug 2012 14:10:41 -0700
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making sense
One more question before I disappear. I've been tracing through the
bootstrapping code with WinDbg and am currently in factor_vm::compile_all_words
where a loop is about to compile 4894 words. These are accessible as words,
which in turn can server up their definitions (via word-def). These
You can do this:
./factor
in the repl: die
then in the shell:
words
It dumps a list of word addresses in Factor.
This works for words, but not quotations.
Hope this helps.
Doug
On Fri, Aug 10, 2012 at 2:55 PM, Michael Clagett mclag...@hotmail.com wrote:
One more question before I disappear.
Doug, thank you for your help, but I'm afraid I didn't understand everything in
your response. Not sure of the context of your instructions. Not sure, for
example, what you mean by ./factor (is this something I'm supposed to type
somewhere?), what you mean by in the repl: die (not sure what
./factor starts Factor from the command-line. If you're on mac, you
get a terminal listener (to start it right, you want to run it from
the app: ./Factor.app/Contents/MacOS/factor); if you're on linux, you
get the UI. In Windows, you run factor.com and it launches the UI.
So in whatever REPL
Thank you, Joe, once again for your help. I have settled into a nice rythym of
virtually tracing through the code by looking at the source (both vm and factor
files), augmented by the Help system in the listener. That should keep me busy
and out of your hair for a couple months (or couple
On Wed, Aug 8, 2012 at 9:56 PM, Michael Clagett mclag...@hotmail.com wrote:
Hi Joe --
Thank you so much for your guidance. I'm assuming that it is the
basis\bootstrap\image\image.factor and the core\bootstrap\primitives.factor,
stage1.factor and syntax.factor that you are referring to?
One
Much appreciated, thanks. I had actually already discovered some significant
portion of what you explain below, which is why I'm going to hold off on the
baby-step questions so that I can save the limited Joe Groff bandwidth that the
universe is going to provide me for more meaty important
Quick question about parse-file.Is the quotation that is returned on the
stack as a result of this word a parse tree, as discussed in the
documentation's article on parsing? This would be a parse tree as in Tokens
are appended to the parse tree, the top level of which is a quotation
Hi -- I've been tracing through the initial vm initialization code trying to
get a picture of how Factor bootstraps itself. Does anyone know if there is a
way to resolve code in the initial boot image that is being jit-compiled by
factor_vm::prepare_boot_image to a set of symbolic names that
On Wed, Aug 8, 2012 at 3:24 PM, Michael Clagett mclag...@hotmail.com wrote:
Hi --
I've been tracing through the initial vm initialization code trying to get a
picture of how Factor bootstraps itself. Does anyone know if there is a way
to resolve code in the initial boot image that is being
On Wed, Aug 8, 2012 at 8:23 PM, Joe Groff arc...@gmail.com wrote:
The code in the bootstrap.image module outputs the bootstrap image as
a binary blob. You can get a sense for the format of the bootstrap
image and its contents by looking at that module.
To clarify, by output as a binary blob I
Hi Joe -- Thank you so much for your guidance. I'm assuming that it is the
basis\bootstrap\image\image.factor and the core\bootstrap\primitives.factor,
stage1.factor and syntax.factor that you are referring to? One question just to
help me get oriented before I go into heavy head-twisting
45 matches
Mail list logo