Re: [Factor-talk] slide-rule

2010-02-05 Thread Jim mack
Oh, sorry, I misunderstood something a while back.  I thought this was a
process to take a few inputs and generate a gcode file that ran some kind of
machine process to produce it, but I see where you mention wanting to
present a graphic simulation.

Doesn't this type of input to a milling machine have its own visualizer?

On Fri, Feb 5, 2010 at 1:10 PM, Hugh Aguilar wrote:

>
> --
> *From:* Jim mack 
> *To:* factor-talk@lists.sourceforge.net
> *Sent:* Wed, February 3, 2010 10:02:50 PM
> *Subject:* Re: [Factor-talk] slide-rule
>
> > I am just getting started in Factor, and am partially drawn to the
> ability to do cross platform GUI development, but I thought I should mention
> a cool ability to ship a self-contained HTTP server using their easy to use
> furnace library.  It could launch a browser to itself on startup and produce
> the output format file locally.  If you already do web programming it
> shouldn't be much of a learning curve.
>
>
> I have never done any GUI programming or web programming, so either
> approach would represent new ground for me. I am somewhat dubious of the
> idea of a browser/server, as there is a lot of data to work with. I could be
> wrong, considering that I've never done this, but my understanding of the
> browser/server idea is that the program running on the browser is dealing
> with a very small amount of data such as the fields in a data-entry form.
>
> Perhaps it would help if I explained how my slide-rule program works: It is
> a three-stage process:
>
> 1.) I have words such as D-scale, A-scale, etc., that each generate a
> linked-list representing the scale. Each node is a MARK:
>
> list
> w field .kind\  the kind of mark this is (TNY, SML,
> MID, BIG or XTR)
> f field .n   \ the numeric value of the mark
> (corresponds to .LABEL)
> f field .dist   \ derived from N and measured in Lunits
> (distance from left edge)
> w field .orientation   \ the direction of the label in relation to
> the mark
> w field .label\ the hstr of the label if there is a
> label
> constant mark
>
> \ If .ORIENTATION is N/A, then there is no label and .LABEL is irrelevant.
> \ The DIST value is nominally in the range [0,1], although it might extend
> over the edge slightly.
>
> 2.) I convert these MARK lists into SHAPE lists. These contain absolute
> coordinates (in inches) of all the marks and labels on a particular face of
> the slide-rule. Each node is a SHAPE:
>
> list
> p field .src
> p field .dst
> w field .siz
> w field .txt
> constant shape \ a text string or a line segment
>
> \ The P fields are .X and .Y pairs.
> \ If the .SIZ field is a KIND (TNY, SML, MID, BIG or XTR), then the shape
> is a text string.
> \ The .SRC field is the lower-left corner and the .DST field is not used.
> \ If the .SIZ field is N/A, then the shape is a line segment.
> \ The .SRC and .DST fields are the endpoints.
>
> 3.) I convert the SHAPE lists into gcode. All the information in each SHAPE
> node gets etched with G01 commands, and I also pick up the tool and move it
> with a G00 command from each element to the next.
>
> The Factor program would be the same as the Forth except that I will use
> sequences rather than linked lists, as linked lists are apparently not
> idiomatic in Factor. The GUI would allow the user to drag-and-drop the
> scales into place to construct the slide-rule, and would also allow the user
> to simulate the use of the slide-rule by moving the slide and the cursor to
> and fro on the constructed slide-rule. There would have to be an alternative
> #3 step above that generates some kind of graphical image rather than gcode.
>
> Does Factor have the ability to display SVG on the screen? Or would I need
> to generate some other kind of graphical image? If Factor has support for
> displaying graphical images (of any kind) on the screen, then I think the
> whole thing would be best written in Factor as a GUI program. If Factor
> can't do this, then it might be better to have the Factor program generate
> SVG on the server side, and then write a JavaScript program to run in a
> browser and display the SVG images.
>
>
>
>
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> __

Re: [Factor-talk] slide-rule

2010-02-05 Thread Hugh Aguilar



From: Jim mack 
To: factor-talk@lists.sourceforge.net
Sent: Wed, February 3, 2010 10:02:50 PM
Subject: Re: [Factor-talk] slide-rule

> I am just getting started in Factor, and am partially drawn to the ability to 
> do cross platform GUI development, but I thought I should mention a cool 
> ability to ship a self-contained HTTP server using their easy to use furnace 
> library.  It could launch a browser to itself on startup and produce the 
> output format file locally.  If you already do web programming it shouldn't 
> be much of a learning curve.



I have never done any GUI programming or web programming, so either approach 
would represent new ground for me. I am somewhat dubious of the idea of a 
browser/server, as there is a lot of data to work with. I could be wrong, 
considering that I've never done this, but my understanding of the 
browser/server idea is that the program running on the browser is dealing with 
a very small amount of data such as the fields in a data-entry form.

Perhaps it would help if I explained how my slide-rule program works: It is a 
three-stage process:

1.) I have words such as D-scale, A-scale, etc., that each generate a 
linked-list representing the scale. Each node is a MARK:

list
w field .kind\  the kind of mark this is (TNY, SML, MID, 
BIG or XTR)
f field .n   \ the numeric value of the mark 
(corresponds to .LABEL)
f field .dist   \ derived from N and measured in Lunits 
(distance from left edge)
w field .orientation   \ the direction of the label in relation to the 
mark
w field .label\ the hstr of the label if there is a label
constant mark

\ If .ORIENTATION is N/A, then there is no label and .LABEL is irrelevant.
\ The DIST value is nominally in the range [0,1], although it might extend over 
the edge slightly.

2.) I convert these MARK lists into SHAPE lists. These contain absolute 
coordinates (in inches) of all the marks and labels on a particular face of the 
slide-rule. Each node is a SHAPE:

list 
p field .src
p field .dst
w field .siz
w field .txt
constant shape \ a text string or a line segment

\ The P fields are .X and .Y pairs.
\ If the .SIZ field is a KIND (TNY, SML, MID, BIG or XTR), then the shape is a 
text string.
\ The .SRC field is the lower-left corner and the .DST field is not used.
\ If the .SIZ field is N/A, then the shape is a line segment.
\ The .SRC and .DST fields are the endpoints.

3.) I convert the SHAPE lists into gcode. All the information in each SHAPE 
node gets etched with G01 commands, and I also pick up the tool and move it 
with a G00 command from each element to the next.

The Factor program would be the same as the Forth except that I will use 
sequences rather than linked lists, as linked lists are apparently not 
idiomatic in Factor. The GUI would allow the user to drag-and-drop the scales 
into place to construct the slide-rule, and would also allow the user to 
simulate the use of the slide-rule by moving the slide and the cursor to and 
fro on the constructed slide-rule. There would have to be an alternative #3 
step above that generates some kind of graphical image rather than gcode.

Does Factor have the ability to display SVG on the screen? Or would I need to 
generate some other kind of graphical image? If Factor has support for 
displaying graphical images (of any kind) on the screen, then I think the whole 
thing would be best written in Factor as a GUI program. If Factor can't do 
this, then it might be better to have the Factor program generate SVG on the 
server side, and then write a JavaScript program to run in a browser and 
display the SVG images. 



  --
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] slide-rule

2010-02-03 Thread Jim mack
I am just getting started in Factor, and am partially drawn to the ability
to do cross platform GUI development, but I thought I should mention a cool
ability to ship a self-contained HTTP server using their easy to use furnace
library.  It could launch a browser to itself on startup and produce the
output format file locally.  If you already do web programming it shouldn't
be much of a learning curve.

On Wed, Feb 3, 2010 at 1:46 PM, Hugh Aguilar wrote:

> I completed my Forth program for generating gcode for etching aluminum
> slide-rules. I can email it to anybody who wants it, and it is also
> available on www.forth.org. It is pretty robust code and anybody with a
> little knowledge of Forth can upgrade it to include custom scales. There are
> a lot of applications-specific scales that people might want, but I only
> have the more generally useful scales. Even if a person knows nothing of
> Forth, he can do some cut-and-paste to rearrange the scales into whatever
> layout he wants. At this time I have these slide-rules written:
>
> two-sided basic model
> two-sided electrical-engineer model (has hyperbolic trig functions)
> one-side pocket model
> round key-fob model (has LL scale tied to A scale for calculating compound
> interest)
>
> I am telling you Factor folks about this as most of you know some Forth.
> Also, the most likely next step with this program will be to port it over to
> Factor and give it a GUI so that people can construct slide-rules of their
> own design and also simulate them on the computer. I've never written a GUI
> program before, so this will be a pretty big step for me. Generating the
> gcode for milling machines was the most important part, as that is necessary
> for building physical slide-rules, but that part is done now.
>
> These are the scales that I have at this time:
>
> L-scale Common (base-10) logarithms.
> D-scale The fundamental [1,10] scale.
> DI-scale The D-scale inverted.
> DF-scale The D-scale folded at pi.
> DIF-scale The D-scale folded at pi and inverted.
> R1-scale The lower square-root scale.
> R2-scale The upper square-root scale.
> K1-scale The lower cube-root scale.
> K2-scale The middle cube-root scale.
> K3-scale The upper cube-root scale.
> A-scale The complete square-root scale.
> K-scale The complete cube-root scale.
> S-scale The sine scale in the range [5.7,90].
> CS-scale The cosine scale in the range [0.0,84.3].
> T-scale The tangent scale in the range [5.7,45].
> T2-scale The tangent scale in the range [45,84.3].
> AT-scale The tangent scale in the range [5.7,90] and tied to the A-scale.
> ST-scale The sine/tangent scale in the range [0.57,5.7].
> SH1-scale The hyperbolic sine in the range [0.1,0.88]
> SH2-scale The hyperbolic sine in the range [0.88,3.0]
> TH-scale The hyperbolic tangent in the range [0.1,3.0]
> CH-scale The hyperbolic cosine in the range [0.0,3.0]
> LL3-scale The log-log scale in the range [2.718,22026].
> LL2-scale The log-log scale in the range [1.105,2.718].
> LL1-scale The log-log scale in the range [1.010,1.105].
> LL0-scale The log-log scale in the range [1.001,1.010].
> LL-scale The log-log scale in the range [1.010,2.718] and tied to the
> A-scale.
> LL0N-scale The log-log scale in the range [0.990,0.999].
> LL1N-scale The log-log scale in the range [0.905,0.990].
> LL2N-scale The log-log scale in the range [0.368,0.905].
> LL3N-scale The log-log scale in the range [4.540e-5,0.368].
> C-scale A synonym for D-SCALE.
> CI-scale A synonym for DI-SCALE.
> CF-scale A synonym for DF-SCALE.
> CIF-scale A synonym for DIF-SCALE.
> B-scale A synonym for A-SCALE.
>
>
>
>
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>


-- 
Jim
"I'm for extending the working Medicare program for our seniors all the way
back to contraception, so Americans can concentrate on living their lives
without fear of changing a job, going bankrupt from deductibles or fighting
HMO bureaucracy."
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.s

[Factor-talk] slide-rule

2010-02-03 Thread Hugh Aguilar
I completed my Forth program for generating gcode for etching aluminum 
slide-rules. I can email it to anybody who wants it, and it is also available 
on www.forth.org. It is pretty robust code and anybody with a little knowledge 
of Forth can upgrade it to include custom scales. There are a lot of 
applications-specific scales that people might want, but I only have the more 
generally useful scales. Even if a person knows nothing of Forth, he can do 
some cut-and-paste to rearrange the scales into whatever layout he wants. At 
this time I have these slide-rules written:

two-sided basic model
two-sided electrical-engineer model (has hyperbolic trig functions)
one-side pocket model
round key-fob model (has LL scale tied to A scale for calculating compound 
interest)

I am telling you Factor folks about this as most of you know some Forth. Also, 
the most likely next step with this program will be to port it over to Factor 
and give it a GUI so that people can construct slide-rules of their own design 
and also simulate them on the computer. I've never written a GUI program 
before, so this will be a pretty big step for me. Generating the gcode for 
milling machines was the most important part, as that is necessary for building 
physical slide-rules, but that part is done now.

These are the scales that I have at this time:

L-scale Common (base-10) logarithms.
D-scale The fundamental [1,10] scale.
DI-scale The D-scale inverted.
DF-scale The D-scale folded at pi.
DIF-scale The D-scale folded at pi and inverted.
R1-scale The lower square-root scale.
R2-scale The upper square-root scale.
K1-scale The lower cube-root scale.
K2-scale The middle cube-root scale.
K3-scale The upper cube-root scale.
A-scale The complete square-root scale.
K-scale The complete cube-root scale.
S-scale The sine scale in the range [5.7,90].
CS-scale The cosine scale in the range [0.0,84.3].
T-scale The tangent scale in the range [5.7,45].
T2-scale The tangent scale in the range [45,84.3].
AT-scale The tangent scale in the range [5.7,90] and tied to the A-scale.
ST-scale The sine/tangent scale in the range [0.57,5.7].
SH1-scale The hyperbolic sine in the range [0.1,0.88]
SH2-scale The hyperbolic sine in the range [0.88,3.0]
TH-scale The hyperbolic tangent in the range [0.1,3.0]
CH-scale The hyperbolic cosine in the range [0.0,3.0]
LL3-scale The log-log scale in the range [2.718,22026].
LL2-scale The log-log scale in the range [1.105,2.718].
LL1-scale The log-log scale in the range [1.010,1.105].
LL0-scale The log-log scale in the range [1.001,1.010].
LL-scale The log-log scale in the range [1.010,2.718] and tied to the A-scale.
LL0N-scale The log-log scale in the range [0.990,0.999].
LL1N-scale The log-log scale in the range [0.905,0.990].
LL2N-scale The log-log scale in the range [0.368,0.905].
LL3N-scale The log-log scale in the range [4.540e-5,0.368].
C-scale A synonym for D-SCALE.
CI-scale A synonym for DI-SCALE.
CF-scale A synonym for DF-SCALE.
CIF-scale A synonym for DIF-SCALE.
B-scale A synonym for A-SCALE.



  --
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk