Re: [Factor-talk] Emacs/FUEL; web server; sqlite installation for Factor

2010-11-24 Thread Jim mack
On Wed, Nov 24, 2010 at 2:04 AM, Shaping  wrote:

> Jim, does your web-server example work for you?  The example you posted
> failed for me during init-db.  init-db successfully creates the user adhoc
> subdirectory, and then fails shortly after this, but I could not determine
> with the walker the exact problem.  The stack trace I posted showed a
> call-effect-unsafe problem.  I do not know what this means.
>
>
>
> Is there a special procedure for installing the sqlite3.* files?  I am
> assuming not.  I put them in the Factor working directory.  I did this based
> on your original instructions in your first posting on the web server.
>
>
>
I have noticed your asking this, but don't have an answer for you on
Windows.  We've already covered where to get the dlls from, and where to put
them - your factor home folder.  From that point all the sqlite attempts
worked for me.

I am more of an end user than many of these other guys on here, so I don't
have any answers.  I once learned everything I could about any computer I
had, but gave that up several platforms ago - I never seemed to use the
info, there isn't room any more, etc.

My suspicion is that there is some kind of permission problem, or a 64 bit
issue.  Do you have another MS machine you can play on to test this?  I
switch back and forth between mac and windows and often get clues from
that.  Maybe you could get past this awkward learning period by booting to
linux and playing there, using the built in emacs editor.  Then, gradually
shift to windows - then you know you're doing it 'right' and the only issue
is the platform.  I do this for all my open source work.

I have learned some walker/debugger tricks.  One that may have already
occurred to you is to use a grep tool to find likely places for something to
happen, put a B in the source every where (maybe with some kind of
marking/numbering system like
"name of proc" drop
to help you know where you are).
--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Emacs/FUEL; web server; sqlite installation for Factor

2010-11-24 Thread Joe Groff
On Wed, Nov 24, 2010 at 3:34 PM, Shaping  wrote:

> I still find most of the Factor words difficult to understand without many
> references  to the help browser.  I have a general solution to this problem
> planned, but implementing it requires considerable re-writing, which I must
> do, anyway, as preparation for the new GUI.  I can't do this efficiently
> until I have a good text editing and am able to change the font in the
> listener, which I still  have no idea how to do.
>

There isn't a clean API to change the font or styles of the listener.
However, on Windows you can hack basis/windows/fonts/fonts.factor to do so.
In fonts.factor there are two definitions "windows-fonts" and
"(cache-fonts)". "windows-fonts" looks like this:

MEMO: windows-fonts ( -- fonts )
windows-major 6 >=
H{
{ "sans-serif" "Segoe UI" }
{ "serif" "Cambria" }
{ "monospace" "Consolas" }
}
H{
{ "sans-serif" "Tahoma" }
{ "serif" "Times New Roman" }
{ "monospace" "Courier New" }
} ? ;

This sets the mapping of the default Factor sans serif/serif/monospace font
families to Windows font family names. The first set is used on Windows
Vista or 7, and the second on XP. You can change these to whatever you
prefer. The listener uses the "monospace" font mapping while the docs
browser uses the "sans-serif" mapping.

To change the size of fonts, look at "(cache-font)":

MEMO:: (cache-font) ( font -- HFONT )
*font size>>* neg ! nHeight
0 0 0 ! nWidth, nEscapement, nOrientation
font bold?>> FW_BOLD FW_NORMAL ? ! fnWeight
font italic?>> TRUE FALSE ? ! fdwItalic
FALSE ! fdwUnderline
FALSE ! fdWStrikeOut
DEFAULT_CHARSET ! fdwCharSet
OUT_OUTLINE_PRECIS ! fdwOutputPrecision
CLIP_DEFAULT_PRECIS ! fdwClipPrecision
DEFAULT_QUALITY ! fdwQuality
DEFAULT_PITCH ! fdwPitchAndFamily
font name>> windows-font-name
CreateFont
dup win32-error=0/f ;

Note the reference to "font size>>" at the very beginning. You can globally
scale the font sizes used in the UI by applying a multiplier to this value,
for example:

MEMO:: (cache-font) ( font -- HFONT )
*font size>> 1.5 * >integer* neg ! nHeight
0 0 0 ! nWidth, nEscapement, nOrientation
font bold?>> FW_BOLD FW_NORMAL ? ! fnWeight
font italic?>> TRUE FALSE ? ! fdwItalic
FALSE ! fdwUnderline
FALSE ! fdWStrikeOut
DEFAULT_CHARSET ! fdwCharSet
OUT_OUTLINE_PRECIS ! fdwOutputPrecision
CLIP_DEFAULT_PRECIS ! fdwClipPrecision
DEFAULT_QUALITY ! fdwQuality
DEFAULT_PITCH ! fdwPitchAndFamily
font name>> windows-font-name
CreateFont
dup win32-error=0/f ;

(The ">integer" is necessary because "CreateFont" expects an integer
height.) Once you've made these changes, press F2 in the listener, type
"save" to commit your changes to the Factor image, and quit and restart the
listener. You should see your font changes take effect after restarting.

-Joe
--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Emacs/FUEL; web server; sqlite installation for Factor

2010-11-24 Thread Shaping
I will try both Editpro and e-text-editor.  Thanks for the suggestions Joe
and Jim.

 

Jim, does your web-server example work for you?  The example you posted
failed for me during init-db.  init-db successfully creates the user adhoc
subdirectory, and then fails shortly after this, but I could not determine
with the walker the exact problem.  The stack trace I posted showed a
call-effect-unsafe problem.  I do not know what this means. 

 

Is there a special procedure for installing the sqlite3.* files?  I am
assuming not.  I put them in the Factor working directory.  I did this based
on your original instructions in your first posting on the web server.

 

I still find most of the Factor words difficult to understand without many
references  to the help browser.  I have a general solution to this problem
planned, but implementing it requires considerable re-writing, which I must
do, anyway, as preparation for the new GUI.  I can't do this efficiently
until I have a good text editing and am able to change the font in the
listener, which I still  have no idea how to do.

 

Factor-- the vocabularies--feels opaque and difficult to explore at high
rates.  I'm used to the Smalltalk environ, in this respect.  I'm reading
Slava's Factor Developer's Handbook now.  It is more older, but more
cohesive/contextual than the new larger hyperlinked version, and I prefer it
for now.  The order of the presentation is everything.

 

 

Shaping

 

From: Jim mack [mailto:j...@less2do.com] 
Sent: 2010-November-23, 10:35
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Emacs/FUEL

 

There's an argument to be had for sticking to what you already use and love,
and making that work better.  I personally tried a few, and had used the sci
editor in the past on windows, but gravitated back to my editpadpro.  I then
found ways to get an imperfect syntax highlighter going - they provide a
regular expr tool interface and now it handles nested [ & {, highlights the
first word after a : at the beginning of line, pulls attention to strings,
and bolds out the operators like cleave and bi that are so common.  That was
enough to get it out of the way for now.  I did just find out how to get a
clickable link to the offending file when an autouse triggers an additional
file, and that's made things more fun as well.  Did you know that if you're
in the error browser, clicking a particular error will focus you to that
line in some editors, editpadpro included?  You can try it for free; I've
been using it since it was made.  http://www.editpadpro.com/

 

 

On Tue, Nov 23, 2010 at 5:05 AM, Joe Groff  wrote:

On Tue, Nov 23, 2010 at 5:40 PM, Shaping  wrote:

ErgoEmacs is too slow.  I've uninstalled it and I'm going back to regular
Emacs 23.2.  The problem is that the scroll-wheel dynamic is very
sluggish--unusable really.  I think Jim noticed this earlier.  I did not
notice the problem until I had a need to page/scroll down in my larger
files.

 

Before I reinstall Emacs, is there any other option for Factor-editor
integration with color and formatting on Windows?  I like the REPL
integration very much, but will do without it, if I can have a normal
Windows keyboard binding, like Notepad++'s .  The vocab for Notepadpp looks
like it provides only an ability to launch the editor. 

 

Nothing is as fully developed as FUEL. You can try using the TextMate plugin
with the e text editor from http://www.e-texteditor.com/, which is
compatible with TextMate bundles. Its syntax highlighting should work out of
the box, but the REPL interaction support relies on MacOS X's Services
feature and would have to be ported to use another communication mechanism
to interact with Factor on Windows.

 

-Joe



--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
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."

--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev__