1. utility program suggestions
- Posted by Kenneth Rhodes <ken_rhodes30436 at y?hoo.?om> May 21, 2008
- 791 views
I made this pitch to Robert Craig once I believe -thought I'd give it another try. Jiri Babor has written several wonderful utility programs which I think would make worthwhile additions to the those already included in /bin/. http://www.rapideuphoria.com/tidy.zip Well, actually Jeremy's amended version. From Jiri's Euphoria page. I suppose his permission might be needed to add these utilities: http://homepages.paradise.net.nz/~jbabor/eu/text/replace.zip command line utility program replaces text in several different files This routine might be a useful addition to 4.0: http://homepages.paradise.net.nz/~jbabor/eu/misc/bfind.zip Binary search of a sorted sequence. Gabriel Boehme code. Earlier Joe Otto's routine is almost identical. Ken Rhodes Folding at Home: http://folding.stanford.edu/ 100% MicroSoft Free SuSE Linux 10.3 No AdWare, SpyWare, or Viruses! Life is Good,
2. Re: utility program suggestions
- Posted by Kenneth Rhodes <ken_rhodes30436 at yahoo.c?m> May 21, 2008
- 761 views
Jeremy and all: This a suggestion for a global function extractor/ keyword syntax file generator. Although, the code for this already exists in several different Euphoria editors, having a small command line utility which generates a syntax file would be useful: 1. The output could be used to update existing syntax files as euphoria grows. It follows that the syntax files could also be used to implement context sensitive help systems which are easily kept up-to-date. 2. The output or the utility itself could be extended to create syntax files for non-euphoria editors such as Kate, Jedit, vim, etc. Ken Rhodes Folding at Home: http://folding.stanford.edu/ 100% MicroSoft Free SuSE Linux 10.3 No AdWare, SpyWare, or Viruses! Life is Good,
3. Re: utility program suggestions
- Posted by Jeremy Cowgar <jeremy at cowgar?co?> May 21, 2008
- 771 views
Kenneth Rhodes wrote: > > I made this pitch to Robert Craig once I believe -thought I'd > give it another try. Jiri Babor has written several wonderful > utility programs which I think would make worthwhile additions > to the those already included in /bin/. > I think utilities that have a direct relation to helping the Euphoria programmer is good, however, we also need to think about how much we are adding to Euphoria for the developers to continue to maintain. If we adopt the code we are really saying we will continue to maintain it. I think there needs to be a balance. I am not sure yet, what that balance may be. -- Jeremy Cowgar http://jeremy.cowgar.com
4. Re: utility program suggestions
- Posted by Jeremy Cowgar <jeremy at cowga??com> May 21, 2008
- 747 views
Kenneth Rhodes wrote: > > Jeremy and all: > > This a suggestion for a global function extractor/ keyword syntax file > generator. Although, the code for this already exists in several > different Euphoria editors, having a small command line utility which > generates a syntax file would be useful: > I'm not really sure what you mean. We currently maintain bin/keywords.e which contains internals. in two global sequences that any program can use. Can you expand a bit on what you suggesting? (me might just be tired and not understanding anyone ) -- Jeremy Cowgar http://jeremy.cowgar.com
5. Re: utility program suggestions
- Posted by Jason Gade <jaygade at yaho?.c?m> May 21, 2008
- 768 views
Jeremy Cowgar wrote: > > Kenneth Rhodes wrote: > > > > Jeremy and all: > > > > This a suggestion for a global function extractor/ keyword syntax file > > generator. Although, the code for this already exists in several > > different Euphoria editors, having a small command line utility which > > generates a syntax file would be useful: > > > > I'm not really sure what you mean. We currently maintain bin/keywords.e which > contains internals. in two global sequences that any program can use. > > Can you expand a bit on what you suggesting? (me might just be tired and not > understanding anyone ) > > -- > Jeremy Cowgar > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a> I think something like ctags (although I've never really used that) may be what he's talking about? http://en.wikipedia.org/wiki/Ctags I know that I've thought about doing that. -- A complex system that works is invariably found to have evolved from a simple system that works. --John Gall's 15th law of Systemantics. "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.
6. Re: utility program suggestions
- Posted by Jeremy Cowgar <jeremy at cowga??com> May 21, 2008
- 759 views
Jason Gade wrote: > > > I think something like ctags (although I've never really used that) may be > what > he's talking about? > > <a > href="http://en.wikipedia.org/wiki/Ctags">http://en.wikipedia.org/wiki/Ctags</a> > > I know that I've thought about doing that. Many editors support ctags already. I wonder if we should submit a patch to the ctags project so that it would then know about Euphoria source. That would probably be a better route than creating our own ctags. Exposure and instant support for all sorts of editors. There are a few other programs we should write Euphoria parsers for such as a few generic code2html programs and enscript (code to ps/pdf). I am sure there are others that are widely accepted that would probably be pretty easy to do. -- Jeremy Cowgar http://jeremy.cowgar.com
7. Re: utility program suggestions
- Posted by Kenneth Rhodes <ken_rhodes30436 at yahoo.??m> May 21, 2008
- 775 views
Jeremy Cowgar wrote: > > Kenneth Rhodes wrote: > > > > Jeremy and all: > > > > This a suggestion for a global function extractor/ keyword syntax file > > generator. Although, the code for this already exists in several > > different Euphoria editors, having a small command line utility which > > generates a syntax file would be useful: > > > > I'm not really sure what you mean. We currently maintain bin/keywords.e which > contains internals. in two global sequences that any program can use. > > Can you expand a bit on what you suggesting? (me might just be tired and not > understanding anyone ) > > -- > Jeremy Cowgar > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a> I wasn't clear. Keywords.e contains only two small sequences-- "keywords" "builtins". These two sequences together are only a small fraction of the total stock Euphoria "library" of commands available in the various *.e files located in the include directory. In order to support the additional Euphoria commands add a sequence-- lets call it "library" or "externals" and add a color. I'm suggesting that a utility program be used to extract the global keywords from the various *.e files, append them together in a sequence, sort them and you have a sequence, "library" which gives you color syntax support for the total Euphoria package of commands. Now all those global keywords could be extracted manually. Euphoria is a small language. Lets consider adding support for wxEuphoria-- probably arround 500 global keywords. EuGTK? There's some pretty big libraries out there. But wait, there is more Color syntax support in an editor is nice, but the real power comes from using the color as a que to let you know that you have true context sensitive help-- the color highlighted current word is passed together with a htm "tag" to a browser. See Juergen Leuthje's EuHthelp: http://www.rapideuphoria.com/euhthelp_1.3.tar A global extractor tool would make it easy to for a Euphoria editor to support virtually any third party library. It also could be used as a starting point for a utility program to generate a syntax support for Euphoria syntax support files for non Euphoria editors such as Kate, Jedit, Vim. These editors have Euphoria color syntax support - but they would be much easier to keep up to date with a utility program to generate current files to support Euphoria and its third party libraries. Hope this helps. Ken Rhodes Folding at Home: http://folding.stanford.edu/ 100% MicroSoft Free SuSE Linux 10.3 No AdWare, SpyWare, or Viruses! Life is Good,
8. Re: utility program suggestions
- Posted by Jason Gade <jaygade at yah??.com> May 21, 2008
- 760 views
You know, both Jeremy and I have entries in the archive for Vim. (Although mine isn't actually by me -- it's by Travis Beaty). http://www.rapideuphoria.com/vim-euphoria.zip http://www.rapideuphoria.com/euphoria-vim.zip They both contain breakdowns for what you are proposing, but they should probably be updated. -- A complex system that works is invariably found to have evolved from a simple system that works. --John Gall's 15th law of Systemantics. "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.
9. Re: utility program suggestions
- Posted by Kenneth Rhodes <ken_rhodes30436 at yaho?.com> May 21, 2008
- 760 views
Jason Gade wrote: > > You know, both Jeremy and I have entries in the archive for Vim. (Although > mine > isn't actually by me -- it's by Travis Beaty). > <a > href="http://www.rapideuphoria.com/vim-euphoria.zip">http://www.rapideuphoria.com/vim-euphoria.zip</a> > <a > href="http://www.rapideuphoria.com/euphoria-vim.zip">http://www.rapideuphoria.com/euphoria-vim.zip</a> > > They both contain breakdowns for what you are proposing, but they should > probably > be >>> updated <<<<. > > j. Exactly. My vision is to have a utility program which not only update Euphoria core language support, but also generate context sensitive help support files for Euphoria and "external" third party libraries and at least color syntax support for non-euphoria editor's such as Kate, Vim, and Jed - further context sensitive help support for external libraries could be made available for these editors thru Juergen's EuHTHelp.ex command line program. Ken Rhodes Folding at Home: http://folding.stanford.edu/ 100% MicroSoft Free SuSE Linux 10.3 No AdWare, SpyWare, or Viruses! Life is Good,
10. Re: utility program suggestions
- Posted by Kenneth Rhodes <ken_rhodes30436 at yaho??com> May 21, 2008
- 769 views
Jeremy Cowgar wrote: > > Kenneth Rhodes wrote: > > > > I made this pitch to Robert Craig once I believe -thought I'd > > give it another try. Jiri Babor has written several wonderful > > utility programs which I think would make worthwhile additions > > to the those already included in /bin/. > > > > I think utilities that have a direct relation to helping the Euphoria > programmer > is good, however, we also need to think about how much we are adding to > Euphoria > for the developers to continue to maintain. If we adopt the code we are really > saying we will continue to maintain it. > > I think there needs to be a balance. I am not sure yet, what that balance may > be. > > -- > Jeremy Cowgar > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a> Point taken. One question: How long did it take you to "maintain" Jiri's tidy.ex to the point where you dropped your indent project? How much time would you have saved had tidy.ex been there in the bin directory? One comment: Replace.ex has all of 88 lines of code- take a look at Jiri's code; the man is a Euphoria programming super star! ----------------------------------------------- I don't really mean to belabor the point. I've referenced Jiri's utility programs several times in response to inquiries in this forum. I can keep doing it. :) Ken Rhodes Folding at Home: http://folding.stanford.edu/ 100% MicroSoft Free SuSE Linux 10.3 No AdWare, SpyWare, or Viruses! Life is Good,
11. Re: utility program suggestions
- Posted by Jeremy Cowgar <jeremy at ?o?gar.com> May 21, 2008
- 765 views
Kenneth Rhodes wrote: > > > One question: How long did it take you to "maintain" Jiri's tidy.ex > to the point where you dropped your indent project? How much time > would you have saved had tidy.ex been there in the bin directory? > I didn't drop my indent program because it does a much better job. Did you look at the results of the two? It is also 1/2 the line count and understands all the new syntax. > > One comment: > Replace.ex has all of 88 lines of code- take a look at Jiri's code; > the man is a Euphoria programming super star! > ----------------------------------------------- > I have not looked at it. I know I do things with sed, but it's pretty complex and I goof the syntax all the time. A simple search/replace may be invaluable when helping people upgrade to 4.0. For instance, search/replace continue. For 88 lines of code, it certainly seems worth while. I wonder, maybe an offshoot of that we can make an "auto-upgrade" script but that might be going too far -- Jeremy Cowgar http://jeremy.cowgar.com
12. Re: utility program suggestions
- Posted by Jeremy Cowgar <jeremy at ?owgar?com> May 21, 2008
- 775 views
Kenneth Rhodes wrote: > > > Exactly. My vision is to have a utility program which not only update > Euphoria core language support, but also generate context sensitive help > support files for Euphoria and "external" third party libraries and at > least color syntax support for non-euphoria editor's such as Kate, Vim, > and Jed - further context sensitive help support for external libraries > could be made available for these editors thru Juergen's EuHTHelp.ex > command line program. > The new docs for Euphoria are a modified version of the .htx files used in previous version. It has been greatly simplified and also has very nice PDF and text generation now also! http://jeremy.cowgar.com/euphoria/combined.pdf http://jeremy.cowgar.com/euphoria/combined.txt (both of those are very old and have been made even better yet) It also now has inline function documentation that generates Table of Contents, Alphabetical Indexes, Automatic API Linking, etc...
--** -- Sort the elements of a sequence into ascending order. -- -- The elements can be atoms or sequences. The standard compare() -- routine is used to compare elements. -- -- Parameters: -- x = The sequence to be sorted. -- -- Returns: -- sequence - The original sequence in ascending order -- -- Comments: -- This uses the "Shell" sort algorithm. -- -- This sort is not "stable", i.e. elements that are considered equal might -- change position relative to each other. -- -- Example 1: -- constant student_ages = {18,21,16,23,17,16,20,20,19} -- sequence sorted_ages -- sorted_ages = sort( student_ages ) -- -- result is {16,16,17,18,19,20,20,21,23} -- -- See Also: -- compare -- sort_reverse -- sort_user -- custom_sort global function sort(sequence x) ...
The doc tool already extracts the documentation and function/procedure signatures. It probably would not be a far stretch to make it a generic program extracting the information into a common format that people could use for such tasks as you are speaking. Without a common documentation means, though, it would be impossible for a common program to extract function and documentation from source. It could potentially know a few different doc styles and do it's best. -- Jeremy Cowgar http://jeremy.cowgar.com