Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #1366
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Fri, 16 Mar 2012 03:49:17 -0500 |
| 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 | Fri, 16 Mar 2012 08:54:50 -0000 |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5512 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.5512 |
| X-RFC2646 | Format=Flowed; Response |
| Message-ID | <0IedndlVcZAQY__SnZ2dnUVZ8m4AAAAA@bt.com> (permalink) |
| Lines | 40 |
| X-Usenet-Provider | http://www.giganews.com |
| X-AuthenticatedUsername | NoAuthUser |
| X-Trace | sv3-qC9wHiX64X7y8uXQ2DmiF/xYOJwQRDbSP/GyEyXfV6ZW2gPE6b1xMdM54GuV2slHnmSXNvLeGHMBh12!xQ8/Ej3kuu20ek9jdBVz9yTiuHn4aZVohn/pAwsfAffhyZqN+8+I+zqqBySMiCm2c2Ub+X+6OmY= |
| X-Complaints-To | abuse@btinternet.com |
| X-DMCA-Complaints-To | abuse@btinternet.com |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 2664 |
| Xref | csiph.com comp.lang.misc:1060 comp.programming:1366 |
Cross-posted to 2 groups.
Show key headers only | View raw
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