Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #1366
| From | "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> |
|---|---|
| Newsgroups | comp.lang.misc, comp.programming |
| References | <jjlqg2$vbf$1@news.albasani.net> |
| Subject | Re: multi-line editing/evaluation... |
| Date | 2012-03-16 08:54 +0000 |
| Message-ID | <0IedndlVcZAQY__SnZ2dnUVZ8m4AAAAA@bt.com> (permalink) |
Cross-posted to 2 groups.
BGB wrote:
> I was generally limited (WRT evaluating script expressions) to whatever
> I could reasonably type at a command-prompt.
>
> so, then I was left thinking, "what if I had a text editor"?
>
> the idea would be to have something sort of like QBasic or the "SQL
> Server Management Studio", where one can type/edit scripts, in program,
> and then evaluate them. or, likewise, highlight chunks of text, hit an
> "evaluate" key, and have it do something.
Try looking at the way that most Smalltalks do this (Dolphin is the best to
look at for this issue):
+ Any code editor supports code execution.
+ If you highlight some code then press <some key> then that code is executed.
It's your responsibility to ensure that it makes sense.
+ If your code assigns to a variable that doesn't yet exist then that variable
is "declared" and becomes part of the state of that edit window (note:
Smalltalk doesn't have implicit variable declaration in general, this is a
special feature just for interactive use.)
+ If your press the evaluation key (it's actually F5 in Dolphin, as with the MS
dev tools) when nothing is selected then it uses the current line as the
"selection".
+ A "workspace" (the Smalltalk term for an interactive "console") is just an
initially empty edit window, /not/ a REPL.
It all works very well, and because there only one thing which is both the
"console" and the "editor", it actually simplifies the implementation.
HTH
-- chris
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar
misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-12 14:38 -0700
Re: misc: multi-line editing/evaluation... Rui Maciel <rui.maciel@gmail.com> - 2012-03-12 23:42 +0000
Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-12 17:39 -0700
Re: misc: multi-line editing/evaluation... "BartC" <bc@freeuk.com> - 2012-03-12 23:51 +0000
Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-12 18:29 -0700
Re: misc: multi-line editing/evaluation... "BartC" <bc@freeuk.com> - 2012-03-13 12:31 +0000
Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-13 10:03 -0700
Re: multi-line editing/evaluation... "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-13 02:43 -0400
Re: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-13 11:12 -0700
Re: misc: multi-line editing/evaluation... Paul N <gw7rib@aol.com> - 2012-03-14 15:08 -0700
Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-14 19:11 -0700
Re: misc: multi-line editing/evaluation... "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-15 04:10 -0400
Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-15 13:09 -0700
Re: multi-line editing/evaluation... "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-03-16 08:54 +0000
Re: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-16 09:45 -0700
csiph-web