Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Tim Johnson

#241
Anything else we might add? /
October 25, 2004, 09:33:04 AM
FYI2: Lately I've been using C, python and rebol. Rebol is hugely productive, but

I wouldn't be here if it were the end-all & be-all :-). Some drawbacks there.........



One interesting feature of rebol is that you can 'load a module (which returns a 'block' of

code). The programmer can dynamically append to that block during runtime, and then

'do (evaluate) it. That has the effect of modifying or appending to the original context

without changing the original module source. I think mzscheme has something like that.

 

Just curious, was there a specific reason for the development of newlisp? My niece

worked for Rebol Technologies in 2000. She has many interesting stories to tell!



Regards

tim
#242
Anything else we might add? /
October 25, 2004, 08:26:48 AM
Aha!

FYI: I am an "old" (in more ways than one) web programmer, but

have always loaded modules "passively".  (evaluate, but execute

from calling code)

I see a 'readline in the code now.



Thanks again

tim
#243
Anything else we might add? /
October 24, 2004, 08:10:46 PM
I've answered part of my question. Forgot to use the context protocol.

Should have been:

(CGI:url-translate "abc%20def")    ;; or something like that.

;; DUH!!



The questions till remains :

Why the extra carriage return (<enter>) to evaluate the

'load form?

thanks

tim

P.S. I promise not to figure out that last one as quickly :-)
#244
Anything else we might add? / Load Confusion
October 24, 2004, 06:46:57 PM
According to newlisp docs 'load :

Loads and translates newLISP from a source file specified ....

... evaluates the expressions contained in the file ...

... when loading is successful load returns true



The following console session uses cgi.lsp copied as cgitest.lsp

I note that the console is unresponsive until <enter> is pressed

a second time (why is that?).

Furthermore after a second <enter> and seeing 'true, a function

contained in the file is not recognized:

Console copy follows

> (load "cgitest.lsp")



true

> (url-translate "abcdef")



invalid function : (url-translate "abcdef")



;; Does not seem that cgitest.lsp is being evaluated

;; What am I doing wrong?

thanks

tim
#245
Anything else we might add? /
October 21, 2004, 02:40:27 PM
<Lutz>

When on Linux/UNIX you can use the 'edit' macro in init.lsp which will pop up an editor, when

you save it gets autonmatically loaded again and evaluated, the poor man's IDE :). You may have

 to customize the edit-macro for the name/location of your editor.

</Lutz>

<Tim>

Thank you Lutz. That's very helpful. I've been looking thru docs that I have

and have not yet found references to 'edit-macro. Can you point me to more

info on edit-macro and init.lsp

thanks

</tim>
#246
Anything else we might add? /
October 21, 2004, 11:09:11 AM
Thank you Sammo.

'load will give me what I need to hack the

scheme inferior process mode for emacs. (I think)



<Sammo>

newLisp's command-line environment is not a good environment for entering multi-line expressions.

</Sammo>



I cast my vote for multi-line functionality in newLisp.

cheers

tim
#247
I can't seem to get multi-line expressions to work on the command line of

the newlisp interpreter.  I'm getting a "missing parenthesis" error when I

attempt it.

What am I missing here?

Also, is it possible to evaluate or "run" a file of newlisp code from the command line.



Using RH 9.0. newLISP v.8.2.0

Pointers to docs and other threads welcome.

thanks

tim
#248
newLISP in the real world /
October 18, 2004, 06:03:50 PM
Code for the inferior process is at:

http://www.johnsons-web.com/demo/newlisp/tj-reb-comint.el">http://www.johnsons-web.com/demo/newlis ... -comint.el">http://www.johnsons-web.com/demo/newlisp/tj-reb-comint.el
#249
newLISP in the real world /
October 18, 2004, 12:55:55 PM
Legend: emacs=(collectively, both forks of emacs)

        lispish=(variant, descendent or "dialect" of lisp)

<Eddie>

I've only played with the scheme.el in emacs. I've used emacs for about 8 years

but to be honest, I don't know anything about its inner workings. I discovered

a few things by hunting them down on the Internet.

</Eddie>

I find emacs very hard to learn and finding a good support community more

difficult than with vim. But worth the effort. I like to think that the emacs

"internals" are an elisp programming environment. (elisp = another lispish

language). A newlisp progammer may find much familiar territory in the emacs

internals.

<Eddie>

I used the M[ key sequence and ran newLISP from the shell command line.

</Eddie>

I've written a crude emacs inferior process for rebol, seems to work, and

it wouldn't take much to make a similar one for newlisp. However, I'm inclined

to contact the quack author first and see if he has the time or interest to

modify quack to better accomodate newlisp. His code demostrates the intent

to adapt to any number of lispish languages.

<Eddie>

I've never tried xemacs. Sounds like that might be a better way to go.

</Eddie>

My experience is that xemacs is more user friendly and has additional features

from GNU emacs. But that could be specific to my system and my situation

<Eddie>

Maybe we should try working with Lutz's newlisp-tk? Add keyword highlighting

and better indention and stuff?

</Eddie>

I intend to check that out when I have more time.

I would hope that Lutz would have some comments to contribute here...

read on:

<Eddie>

Maybe even as a group we might write our own newLISP editor in newLISP. I would

to be able to switch key-bindings to one of the standards however. The thought

of an editor in newLISP has crossed my mind several times and would be a real

test for newLISP. I've just never had the time to devote to such a big

programming project to do alone. If you wanted to take the lead, I would be

willing to devote an hour a day to such a project. If we could start with a

nice overall structure and spec, we work our way towards that end.

</Eddie>

To be clear about my professional goals and specific situation:

I have many obligations in my business that limit my R&D time, and being self-employed,

I have no R&D budget. My R&D goal is to =>

1)Learn emacs

2)Learn a lispish language (and newlisp fits the bill better than any other, to make

  a long story short).

In short such a contribution may be beyond my time constraints *and* ability,

but :-) read on:

<Eddie>

What do you think Tim?

</Eddie>

Here's some thoughts (and these thoughts are spinoffs of some of my R&D

goals) I have a need to customize emacs to allow a perl programmer used to

KEdit to make a transition without learning much new, and then add

functionality incrementally.  Similarly with emacs, given the similarity

between newlisp and elisp perhaps one could customize a "newlisp-friendly"

emacs that could even be bundled with newlisp. With an assortment of keybinding

modules that could allow transitions from other editors. And maybe there is a

tie-in with newlisp-tk?



And for anyone reading this that just hates emacs - here's another thought.

Vim offers hooks to compile in perl, python, and ruby interpreters. I believe

that it is doable for Lutz to work with Bram Moolenar to make newLisp compilable

into vim. I currently use vim with python compiled in for my coding in C/CC+,

rebol and python.

-Tim-
#250
newLISP in the real world /
October 17, 2004, 04:09:50 PM
I just went thru jsmal's first chapter.  Good tutorial!

I used three different ways of testing the code:



1)Newlisp from shell command line

2)As an emacs inferior process command line.

3)From a .lsp file buffer, piping to the inferior process.



Seems to be a problem with the inferior process:

Multiple line forms give an error message:

"missing parenthesis"

when evaluated either from the buffer or the command line

of the process. It looks like the process is being blocked

from evaluating more than one line at a time.....



No biggie. Am writing an inferior process from scratch from rebol.

Should give some clues, might have to write a from-scratch process

for newlisp also. Or I've missed something in my emacs understanding...
#251
newLISP in the real world /
October 17, 2004, 12:20:01 PM
I had problems using scheme.el with both lucid and GNU emacs.

My solution was quack.el, which is a very nice piece of work. The

original is available at http://www.neilvandyke.org/quack/">http://www.neilvandyke.org/quack/.

I did a quick "hack" of quack.el viewable at

http://www.johnsons-web.com/demo/newlisp/">http://www.johnsons-web.com/demo/newlisp/ where I simply cleared

'quack-pltish-keywords-to-fontify, and dropped in keywords from

keywords.txt. The inferior process worked right "out of the box", quack

presumes a default interpreter, accepts any interprerter name and

then "remembers" it.



It appears that quack.el is equally compatible with both emacs

forks. However the author suggests that it functions better with

GNU emacs. Sadly, GNU emacs does not preform well for me

on my system Xemacs loads much faster and many functions are

also far faster. Dunno why!



TODO: What I'd like to do is hand-roll and install my own font faces.

See font-lock-more.el at the URL above and examples of how I did

it for rebol at sample.el. If continuing the topic of customizing emacs

for newlisp is considered outside of the forum parameters, I've got an

ML that could be used for it.



I'm also an emacs newbie so any contributions would be hugely

welcomed.



thanks

tim
#252
newLISP in the real world /
October 10, 2004, 07:12:23 PM
Thanks for the good wishes and advice. I'm excited about digging into newLisp.

Actually, I'm currently using Xemacs, not gnu Emacs.

Took one look at the xemacs version of scheme.el and since it  looked very

different, I copied the emacs version into my Xemacs load-path.



Xemacs barfed on 'lisp-mode-shared-map. A quick and preliminary google seems to suggest

that I should replace 'lisp-mode-shared-map with 'shared-lisp-mode-map.

(Forks are fun ain't they?) I did a load-library from xemacs and got no further compaints.



I will follow eddier's advice on the key words and report back.



-tim-
#253
newLISP in the real world / newLisp Mode for emacs
October 10, 2004, 10:41:07 AM
I'm new to newLisp, also new to emacs. A search on 'emacs'  indicates that some

members have hacked scheme.el for newLisp. I'd like to do the same. I've parsed

keywords from newlisp_manual.html, and will attempt to hack a copy of

scheme.el myself, but I would appreciate a working copy if one is available, so

I have something to fall back on when I get totally screwed up.



Comments, docs, pointers to relevant topics are welcome.

tim