Lähettäjä: Asko Kauppi <askok@dnainternet.net>
Päiväys: 27. maaliskuuta 2006 17.56.50 GMT+03:00
Vastaanottaja: Lua list <lua@bazar2.conectiva.com.br>
Aihe: Vastaus: Layout (was: Rich text) as Lua sources? :)
Maybe I am biased as a former LabView user (hey, do you know anyone
else liking _both_ C _and_ LV? ;) but the "circling", "adding
notes" etc. sounds like the thing I'm after.
Then again, this kind of concepts should basically be tested out,
before they can be said to either "work" or "not to work". All of
us are soooo used to ASCII and lines as the programming method.
In a way, I would break up the top-to-bottom file layout, too, and
think more in terms of a "page layout" program, where code could be
placed within frames (think: PageMaker, FrameMaker, Adobe
InDesign). Such frames could then be logically arranged, and smart
interconnects being added (think: OmniGraffle, Visio).
A visual debugger in such a framework (pun intended ;) would be
nice, since you could pretty much see all of your source at once
(dynamically "zooming in" wanted sections with a magnifying glass
kind of UI).
Yeah, dream on... but ONE DAY this will happen (and people will
find my email and say, hey, he said it already then..!) :P
-asko
[With the smart interconnects I mean more commentary things, s.a.
Excel's "who's dependent on this cell", or coder made highlights/
arrows, not the LV "pipes" that declare program data flow.]
David Haley kirjoitti 26.3.2006 kello 12.58:
On this day of 3-25-2006 11:07 PM, Asko Kauppi saw fit to scribe:
An old dream of mine, is to have programming (C/C++) sources
being able to have fonts, italics, colour, and even embedded
diagrams or pictures.
This started in -92 using Borland C/C++ (when syntax highlight
was coming into editors), and I am still wondering, why no-one's
"ever" done it. Now, with Lua it wouldn't really be asking for
much, to modify the chunk loader to accept, say, RTF format.
It seems that in general, it wouldn't be too hard to extract the
text from the rich-text. You'd have to separate annotations (e.g.
diagrams, picture legends, etc.) from content (i.e. source code)
but that doesn't sound too hard. In fact, I'm sure that there
already exist programs that take e.g. RTF and print out the plain
text, and then you wouldn't have to modify Lua at all.
Now, has anyone ever tried this, and would the coloring and
embedding possibilities actually pay back in "real life"? In a
more "perfect world" I could see function header comments
actually be "fill me in" spreadsheet tables that can be added at
places (embedded objects).
It would be fun, but would it be useful, too?
I don't know if coloring would pay back in real life, because
syntax highlighting does a fairly good job of that. But several
times I have wanted to say "this code here and that code there
have this problem", where it would be nice to e.g. circle the code
and put a line between them. But we've just gone far beyond simple
RTF.
Still, it would be rather nice to have a structured way of
entering function header comments. Java sort-of does it with
Javadoc, but the formatting is all in text. If you had a more
semantically aware input method, e.g. a table that was aware of
all the code, it would be much easier to put hyper-links to the
rest of the code. Still, you could conceive of such a feature
without using RTF at all; you'd need an editor that understood the
structure of the program, and Eclipse is already pretty darn good
at that.
Now, what might be nice would be to change the size of the text.
Maybe some function is not terribly important, and you might want
to make it size 9 (or whatever your <small> would be) instead of
the size 11 normal font. You don't want it to completely
disappear, which is what folding it would do. But if you could
make certain parts of code smaller, that might be useful for
helping to filter trivial from complex code.
All this being said, I'm having trouble coming up with pressing
examples. I find it much more important to have a semantics-aware
editor, one that is aware of the types (both library and user),
does intelligent auto-completion, makes it easy to navigate to a
class method, etc.
Best,
- David
--
~David-Haley
http://david.the-haleys.org